Commit 1ca7f4dfb5f5b123047357f112b74df7bbc8ff2f
1 parent
dd423029
micro data (breadcrumbs, organization)
Showing
1 changed file
with
31 additions
and
19 deletions
Show diff stats
frontend/views/layouts/main.php
| @@ -126,11 +126,11 @@ use common\models\Event; | @@ -126,11 +126,11 @@ use common\models\Event; | ||
| 126 | </div> | 126 | </div> |
| 127 | <div class="clearfix"></div> | 127 | <div class="clearfix"></div> |
| 128 | <header> | 128 | <header> |
| 129 | - <div class="container"> | 129 | + <div class="container" itemscope itemtype="http://schema.org/Organization"> |
| 130 | <table cellpadding="0" cellspacing="0" border="0" class="header_tb"> | 130 | <table cellpadding="0" cellspacing="0" border="0" class="header_tb"> |
| 131 | <tr> | 131 | <tr> |
| 132 | <td valign="middle" class="col-md-2 col-lg-3"> | 132 | <td valign="middle" class="col-md-2 col-lg-3"> |
| 133 | - <a href="/"><img class="header-new-img" src="/images/new_img/new_logo.png" alt=""></a> | 133 | + <a href="/"><img class="header-new-img" itemprop="logo" src="/images/new_img/new_logo.png" alt=""></a> |
| 134 | </td> | 134 | </td> |
| 135 | <td align="center" valign="middle" class="col-md-4 col-lg-4"> | 135 | <td align="center" valign="middle" class="col-md-4 col-lg-4"> |
| 136 | <table class="tb_phones" cellspacing="0" cellpadding="0" border="0"> | 136 | <table class="tb_phones" cellspacing="0" cellpadding="0" border="0"> |
| @@ -141,7 +141,7 @@ use common\models\Event; | @@ -141,7 +141,7 @@ use common\models\Event; | ||
| 141 | <td> | 141 | <td> |
| 142 | <img src="/images/new_img/ico/ico-7.png" alt=""> | 142 | <img src="/images/new_img/ico/ico-7.png" alt=""> |
| 143 | </td> | 143 | </td> |
| 144 | - <td><p class="header_phones"> | 144 | + <td><p class="header_phones" itemprop="telephone"> |
| 145 | <span>(044)</span> 339-92-33</p></td> | 145 | <span>(044)</span> 339-92-33</p></td> |
| 146 | </tr> | 146 | </tr> |
| 147 | </table> | 147 | </table> |
| @@ -152,7 +152,7 @@ use common\models\Event; | @@ -152,7 +152,7 @@ use common\models\Event; | ||
| 152 | <td> | 152 | <td> |
| 153 | <img src="/images/new_img/ico/ico-9.png" alt=""> | 153 | <img src="/images/new_img/ico/ico-9.png" alt=""> |
| 154 | </td> | 154 | </td> |
| 155 | - <td><p class="header_phones"> | 155 | + <td><p class="header_phones" itemprop="telephone"> |
| 156 | <span>(095)</span> 282-85-08</p></td> | 156 | <span>(095)</span> 282-85-08</p></td> |
| 157 | </tr> | 157 | </tr> |
| 158 | </table> | 158 | </table> |
| @@ -166,7 +166,7 @@ use common\models\Event; | @@ -166,7 +166,7 @@ use common\models\Event; | ||
| 166 | <td> | 166 | <td> |
| 167 | <img src="/images/new_img/ico/ico-8.png" alt=""> | 167 | <img src="/images/new_img/ico/ico-8.png" alt=""> |
| 168 | </td> | 168 | </td> |
| 169 | - <td><p class="header_phones"> | 169 | + <td><p class="header_phones" itemprop="telephone"> |
| 170 | <span>(068)</span> 776-60-67</p></td> | 170 | <span>(068)</span> 776-60-67</p></td> |
| 171 | </tr> | 171 | </tr> |
| 172 | </table> | 172 | </table> |
| @@ -229,16 +229,28 @@ use common\models\Event; | @@ -229,16 +229,28 @@ use common\models\Event; | ||
| 229 | <div class="container"> | 229 | <div class="container"> |
| 230 | 230 | ||
| 231 | <!---test---> | 231 | <!---test---> |
| 232 | - <?= Breadcrumbs::widget([ | ||
| 233 | - 'homeLink' => [ | ||
| 234 | - 'label' => 'Интернет-магазин светильников', | ||
| 235 | - 'url' => Url::to([ '/' ]), | ||
| 236 | - 'itemprop' => 'url', | ||
| 237 | - ], | ||
| 238 | - 'itemTemplate' => "<li><span itemprop=\"title\">{link}</span></li>\n", | ||
| 239 | - // template for all links | ||
| 240 | - 'links' => isset( $this->params[ 'breadcrumbs' ] ) ? $this->params[ 'breadcrumbs' ] : [], | ||
| 241 | - ]) ?> | 232 | + <?php |
| 233 | + if (isset($this->params['breadcrumbs'])) { | ||
| 234 | + $links = $this->params['breadcrumbs']; | ||
| 235 | + foreach($links as $index => $link) { | ||
| 236 | + if(is_array($link)) { | ||
| 237 | + $links[$index]['itemprop'] = 'url'; | ||
| 238 | + $links[$index]['label'] = '<span itemprop="title">'.$links[$index]['label'].'</span>'; | ||
| 239 | + } | ||
| 240 | + } | ||
| 241 | + } | ||
| 242 | + echo Breadcrumbs::widget([ | ||
| 243 | + 'encodeLabels' => false, | ||
| 244 | + 'itemTemplate' => "<li><span itemscope itemtype=\"http://data-vocabulary.org/Breadcrumb\">{link}</span></li>\n", | ||
| 245 | + 'links' => isset( $this->params[ 'breadcrumbs' ] ) ? $this->params[ 'breadcrumbs' ] : [], | ||
| 246 | + 'homeLink' => [ | ||
| 247 | + 'label' => '<span itemprop="title">Интернет-магазин светильников</span>', | ||
| 248 | + 'url' => Url::to([ '/' ]), | ||
| 249 | + 'itemprop' => 'url', | ||
| 250 | + ], | ||
| 251 | + 'activeItemTemplate' => '<span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><span itemprop="title">{link}</span></span>', | ||
| 252 | + ]) | ||
| 253 | + ?> | ||
| 242 | 254 | ||
| 243 | 255 | ||
| 244 | </div> | 256 | </div> |
| @@ -340,7 +352,7 @@ use common\models\Event; | @@ -340,7 +352,7 @@ use common\models\Event; | ||
| 340 | <footer> | 352 | <footer> |
| 341 | <div class="container margin-top-40"> | 353 | <div class="container margin-top-40"> |
| 342 | <div class="row"> | 354 | <div class="row"> |
| 343 | - <div class="col-md-3 col-lg-3"> | 355 | + <div class="col-md-3 col-lg-3" itemscope itemtype="http://schema.org/Organization"> |
| 344 | <div class="footer-title_new">Есть к нам вопросы?</div> | 356 | <div class="footer-title_new">Есть к нам вопросы?</div> |
| 345 | <table class="footer-phones-wr" cellspacing="0" cellpadding="0" border="0" width="100%"> | 357 | <table class="footer-phones-wr" cellspacing="0" cellpadding="0" border="0" width="100%"> |
| 346 | <tr> | 358 | <tr> |
| @@ -349,7 +361,7 @@ use common\models\Event; | @@ -349,7 +361,7 @@ use common\models\Event; | ||
| 349 | <tr> | 361 | <tr> |
| 350 | <td><img src="/images/new_img/ico/ico-7.png" alt=""> | 362 | <td><img src="/images/new_img/ico/ico-7.png" alt=""> |
| 351 | </td> | 363 | </td> |
| 352 | - <td><p class="footer_phones"> | 364 | + <td><p class="footer_phones" itemprop="telephone"> |
| 353 | <span>(044)</span> 339-92-33</p></td> | 365 | <span>(044)</span> 339-92-33</p></td> |
| 354 | </tr> | 366 | </tr> |
| 355 | </table> | 367 | </table> |
| @@ -361,7 +373,7 @@ use common\models\Event; | @@ -361,7 +373,7 @@ use common\models\Event; | ||
| 361 | <tr> | 373 | <tr> |
| 362 | <td><img src="/images/new_img/ico/ico-8.png" alt=""> | 374 | <td><img src="/images/new_img/ico/ico-8.png" alt=""> |
| 363 | </td> | 375 | </td> |
| 364 | - <td><p class="footer_phones"> | 376 | + <td><p class="footer_phones" itemprop="telephone"> |
| 365 | <span>(068)</span> 776-60-67</p></td> | 377 | <span>(068)</span> 776-60-67</p></td> |
| 366 | </tr> | 378 | </tr> |
| 367 | </table> | 379 | </table> |
| @@ -373,7 +385,7 @@ use common\models\Event; | @@ -373,7 +385,7 @@ use common\models\Event; | ||
| 373 | <tr> | 385 | <tr> |
| 374 | <td><img src="/images/new_img/ico/ico-9.png" alt=""> | 386 | <td><img src="/images/new_img/ico/ico-9.png" alt=""> |
| 375 | </td> | 387 | </td> |
| 376 | - <td><p class="footer_phones"> | 388 | + <td><p class="footer_phones" itemprop="telephone"> |
| 377 | <span>(095)</span> 282-85-08</p></td> | 389 | <span>(095)</span> 282-85-08</p></td> |
| 378 | </tr> | 390 | </tr> |
| 379 | </table> | 391 | </table> |