Commit f35da0c9d545e2e1c3db928e73f3f8171e0bdf16
1 parent
05da08fa
microschema breadcrumbs
Showing
1 changed file
with
5 additions
and
2 deletions
Show diff stats
frontend/widgets/SeoBreadcrumbs.php
@@ -70,11 +70,14 @@ | @@ -70,11 +70,14 @@ | ||
70 | $options = $link; | 70 | $options = $link; |
71 | unset($options['template'], $options['label'], $options['url']); | 71 | unset($options['template'], $options['label'], $options['url']); |
72 | if (!$home){ | 72 | if (!$home){ |
73 | - $label = "<span itemprop='name'>".$label."</span>"; | 73 | + $label = "<link itemprop='item' href=" . |
74 | + \Yii::$app->request->getUrl() . | ||
75 | + "><span itemprop='name'>" . | ||
76 | + $label . "</span>"; | ||
74 | } | 77 | } |
75 | $link = Html::a($label, $link['url'], $options); | 78 | $link = Html::a($label, $link['url'], $options); |
76 | } else { | 79 | } else { |
77 | - $link = $label; | 80 | + $link = "<link itemprop=\"item\" href=".\Yii::$app->request->getUrl().">$label"; |
78 | } | 81 | } |
79 | return strtr($template, ['{link}' => $link, '{number}' => $number]); | 82 | return strtr($template, ['{link}' => $link, '{number}' => $number]); |
80 | } | 83 | } |