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 | 126 | </div> |
| 127 | 127 | <div class="clearfix"></div> |
| 128 | 128 | <header> |
| 129 | - <div class="container"> | |
| 129 | + <div class="container" itemscope itemtype="http://schema.org/Organization"> | |
| 130 | 130 | <table cellpadding="0" cellspacing="0" border="0" class="header_tb"> |
| 131 | 131 | <tr> |
| 132 | 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 | 134 | </td> |
| 135 | 135 | <td align="center" valign="middle" class="col-md-4 col-lg-4"> |
| 136 | 136 | <table class="tb_phones" cellspacing="0" cellpadding="0" border="0"> |
| ... | ... | @@ -141,7 +141,7 @@ use common\models\Event; |
| 141 | 141 | <td> |
| 142 | 142 | <img src="/images/new_img/ico/ico-7.png" alt=""> |
| 143 | 143 | </td> |
| 144 | - <td><p class="header_phones"> | |
| 144 | + <td><p class="header_phones" itemprop="telephone"> | |
| 145 | 145 | <span>(044)</span> 339-92-33</p></td> |
| 146 | 146 | </tr> |
| 147 | 147 | </table> |
| ... | ... | @@ -152,7 +152,7 @@ use common\models\Event; |
| 152 | 152 | <td> |
| 153 | 153 | <img src="/images/new_img/ico/ico-9.png" alt=""> |
| 154 | 154 | </td> |
| 155 | - <td><p class="header_phones"> | |
| 155 | + <td><p class="header_phones" itemprop="telephone"> | |
| 156 | 156 | <span>(095)</span> 282-85-08</p></td> |
| 157 | 157 | </tr> |
| 158 | 158 | </table> |
| ... | ... | @@ -166,7 +166,7 @@ use common\models\Event; |
| 166 | 166 | <td> |
| 167 | 167 | <img src="/images/new_img/ico/ico-8.png" alt=""> |
| 168 | 168 | </td> |
| 169 | - <td><p class="header_phones"> | |
| 169 | + <td><p class="header_phones" itemprop="telephone"> | |
| 170 | 170 | <span>(068)</span> 776-60-67</p></td> |
| 171 | 171 | </tr> |
| 172 | 172 | </table> |
| ... | ... | @@ -229,16 +229,28 @@ use common\models\Event; |
| 229 | 229 | <div class="container"> |
| 230 | 230 | |
| 231 | 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 | 256 | </div> |
| ... | ... | @@ -340,7 +352,7 @@ use common\models\Event; |
| 340 | 352 | <footer> |
| 341 | 353 | <div class="container margin-top-40"> |
| 342 | 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 | 356 | <div class="footer-title_new">Есть к нам вопросы?</div> |
| 345 | 357 | <table class="footer-phones-wr" cellspacing="0" cellpadding="0" border="0" width="100%"> |
| 346 | 358 | <tr> |
| ... | ... | @@ -349,7 +361,7 @@ use common\models\Event; |
| 349 | 361 | <tr> |
| 350 | 362 | <td><img src="/images/new_img/ico/ico-7.png" alt=""> |
| 351 | 363 | </td> |
| 352 | - <td><p class="footer_phones"> | |
| 364 | + <td><p class="footer_phones" itemprop="telephone"> | |
| 353 | 365 | <span>(044)</span> 339-92-33</p></td> |
| 354 | 366 | </tr> |
| 355 | 367 | </table> |
| ... | ... | @@ -361,7 +373,7 @@ use common\models\Event; |
| 361 | 373 | <tr> |
| 362 | 374 | <td><img src="/images/new_img/ico/ico-8.png" alt=""> |
| 363 | 375 | </td> |
| 364 | - <td><p class="footer_phones"> | |
| 376 | + <td><p class="footer_phones" itemprop="telephone"> | |
| 365 | 377 | <span>(068)</span> 776-60-67</p></td> |
| 366 | 378 | </tr> |
| 367 | 379 | </table> |
| ... | ... | @@ -373,7 +385,7 @@ use common\models\Event; |
| 373 | 385 | <tr> |
| 374 | 386 | <td><img src="/images/new_img/ico/ico-9.png" alt=""> |
| 375 | 387 | </td> |
| 376 | - <td><p class="footer_phones"> | |
| 388 | + <td><p class="footer_phones" itemprop="telephone"> | |
| 377 | 389 | <span>(095)</span> 282-85-08</p></td> |
| 378 | 390 | </tr> |
| 379 | 391 | </table> | ... | ... |