Skip to content

Commit

Permalink
fix: missing link in breadcrumb list
Browse files Browse the repository at this point in the history
  • Loading branch information
tbreuss committed Jul 30, 2023
1 parent c8e5595 commit c92048a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions views/layouts/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,14 @@ function gtag(){dataLayer.push(arguments);}
<div class="container container--breadcumbList">
<ol vocab="https://schema.org/" typeof="BreadcrumbList">
<li property="itemListElement" typeof="ListItem">
<a property="item" typeof="WebPage" href="<?= Url::home() ?>">
<a property="item" typeof="WebPage" href="<?= Url::home(true) ?>">
<span property="name">Startseite</span></a>
<meta property="position" content="1">
</li>
<?php foreach ($this->params['breadcrumbs'] as $itemCount => $item): ?>
<?php if (is_array($item)): ?>
<li property="itemListElement" typeof="ListItem">
<a property="item" typeof="WebPage" href="<?= Url::to($item['url']) ?>">
<a property="item" typeof="WebPage" href="<?= Url::to($item['url'], true) ?>">
<span property="name"><?= $item['label'] ?></span></a>
<meta property="position" content="<?= $itemCount + 2 ?>">
</li>
Expand Down
4 changes: 1 addition & 3 deletions views/youtube-playlist/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@
* @var array $playlistItems
*/

use yii\helpers\Url;

?>

<?php $this->title = $playlist['title'] . ' | Videos'; ?>
<?php $this->params['metaDescription'] = $playlist['description']; ?>
<?php $this->params['breadcrumbs'][] = ['label' => 'Videos', 'url' => Url::previous('video')]; ?>
<?php $this->params['breadcrumbs'][] = ['label' => 'Videos', 'url' => '/videos']; ?>
<?php $this->params['breadcrumbs'][] = $playlist['title']; ?>

<h1><?= $playlist['title'] ?></h1>
Expand Down
2 changes: 1 addition & 1 deletion views/youtube-playlist/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
?>

<?php $this->title = $playlistItem['title'] . ' | ' . $playlist['title'] . ' | Videos' ?>
<?php $this->params['breadcrumbs'][] = ['label' => 'Videos', 'url' => '/videos/']; ?>
<?php $this->params['breadcrumbs'][] = ['label' => 'Videos', 'url' => '/videos']; ?>
<?php $this->params['breadcrumbs'][] = ['label' => $playlist['title'], 'url' => '/videos/' . $playlist['segment']]; ?>
<?php $this->params['breadcrumbs'][] = $playlistItem['title']; ?>

Expand Down

0 comments on commit c92048a

Please sign in to comment.