Commit e7c5af40eac5a29fcd1c21cdec97ac545cf7ca28
1 parent
363f1aab
breadcrumbs
Showing
6 changed files
with
10 additions
and
8 deletions
Show diff stats
frontend/assets/AppAsset.php
... | ... | @@ -12,11 +12,9 @@ |
12 | 12 | public $basePath = '@webroot'; |
13 | 13 | public $baseUrl = '@web'; |
14 | 14 | public $css = [ |
15 | - 'css/site.css', | |
16 | 15 | 'css/animate.css', |
17 | 16 | 'css/jquery-ui.min.css', |
18 | 17 | 'css/jquery-ui.theme.min.css', |
19 | - 'css/style.css', | |
20 | 18 | 'css/style.turquoise.css', |
21 | 19 | 'css/owl.carousel.css', |
22 | 20 | 'css/owl.theme.css', | ... | ... |
frontend/controllers/SiteController.php
frontend/views/layouts/main.php
... | ... | @@ -667,7 +667,8 @@ _________________________________________________________ --> |
667 | 667 | 'label' => "<span itemprop='name'>".\Yii::t('app', 'Главная')."</span>", |
668 | 668 | 'url' => '/', |
669 | 669 | 'itemprop' => 'item', |
670 | - ] | |
670 | + ], | |
671 | + 'activeItemUrl' => \Yii::$app->request->getAbsoluteUrl(), | |
671 | 672 | ] |
672 | 673 | ) ?> |
673 | 674 | ... | ... |
frontend/views/site/comments.php
frontend/web/.gitignore
frontend/widgets/SeoBreadcrumbs.php
... | ... | @@ -30,6 +30,8 @@ |
30 | 30 | 'itemprop' => 'item', |
31 | 31 | ]; |
32 | 32 | |
33 | + public $activeItemUrl; | |
34 | + | |
33 | 35 | public $activeItemTemplate = '<li class="active" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><span itemprop="name">{link}<meta itemprop="position" content="{number}" /></span></li>'; |
34 | 36 | |
35 | 37 | public function run() |
... | ... | @@ -70,11 +72,11 @@ |
70 | 72 | $options = $link; |
71 | 73 | unset($options['template'], $options['label'], $options['url']); |
72 | 74 | if (!$home){ |
73 | - $label = "<span itemprop='name'>".$label."</span>"; | |
75 | + $label = "<link itemprop=\"item\" href=\"{$this->activeItemUrl}\"><span itemprop='name'>".$label."</span>"; | |
74 | 76 | } |
75 | 77 | $link = Html::a($label, $link['url'], $options); |
76 | 78 | } else { |
77 | - $link = $label; | |
79 | + $link = "<link itemprop=\"item\" href=\"{$this->activeItemUrl}\">".$label; | |
78 | 80 | } |
79 | 81 | return strtr($template, ['{link}' => $link, '{number}' => $number]); |
80 | 82 | } | ... | ... |