Compare View

switch
from
...
to
 
Commits (2)
frontend/views/layouts/main.php
... ... @@ -208,10 +208,26 @@ JS;
208 208  
209 209 <!-- #content должен быть в main.php -->
210 210 <div id="content_" class="section-box-content">
211   - <!-- start breadcrumbs -->
212   - <!-- если не главная выводить сюда-->
213   - <!-- end breadcrumbs -->
214   -
  211 + <?php if (!empty($this->params['breadcrumbs'])){?>
  212 + <section class="section-breadcrumb">
  213 + <div class="container">
  214 + <div class="row">
  215 + <div class="col-xs-12 col-sm-12 breadcrumb-wrapp">
  216 + <?= Breadcrumbs::widget(
  217 + [
  218 + 'links' => isset($this->params[ 'breadcrumbs' ]) ? $this->params[ 'breadcrumbs' ] : [],
  219 + 'homeLink' => [
  220 + 'label' => \Yii::t('app', 'Main'),
  221 + 'url' => Url::home(false, 'common\components\Languages'),
  222 + ],
  223 + ]
  224 + ) ?>
  225 + </ul>
  226 + </div>
  227 + </div>
  228 + </div>
  229 + </section>
  230 + <?php } ?>
215 231 <!-- start content -->
216 232 <?=$content?>
217 233 <!-- end content -->
... ...
frontend/views/page/view.php
... ... @@ -15,23 +15,10 @@
15 15 * @var string $body
16 16 */
17 17 $seo = \Yii::$app->get('seo');
18   - $this->params[ 'breadcrumbs' ][] = $seo->title;
  18 + $this->params[ 'breadcrumbs' ][] = ucfirst($model->language->title);
19 19 ?>
20 20  
21   -<section class="section-breadcrumb">
22   - <div class="container">
23   - <div class="row">
24   - <div class="col-xs-12 col-sm-12 breadcrumb-wrapp">
25   - <ul class="breadcrumb" itemscope="" itemtype=" http://schema.org/BreadcrumbList">
26   - <li itemprop="itemListElement" itemscope="" itemtype="http://schema.org/ListItem"><a href="/" itemprop="item"><span itemprop="name">Главная</span></a><meta itemprop="position" content="1"></li>
27   - <li class="active" itemprop="itemListElement" itemscope="" itemtype="http://schema.org/ListItem"><span itemprop="name">Текстовая страница</span>
28   - <link itemprop="item" content=""><meta itemprop="position" content="2">
29   - </li>
30   - </ul>
31   - </div>
32   - </div>
33   - </div>
34   -</section>
  21 +
35 22  
36 23 <section class="section-text">
37 24 <div class="container">
... ...