Blame view

frontend/views/category/index.php 1.45 KB
4ca21c3e   Alexey Boroda   first commit
1
  <?php
f2acc393   Alexey Boroda   -Seo widget integ...
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
      use common\modules\product\models\Category;
      use common\widgets\Seo;
      use yii\data\ActiveDataProvider;
      use yii\web\View;
      use yii\widgets\ListView;
      
      /**
       * @var Category           $category
       * @var ActiveDataProvider $dataProvider
       * @var View               $this
       */
      $this->params[ 'seo' ][ Seo::TITLE ] = !empty( $category->meta_title ) ? $category->meta_title : $category->name;
      $this->params[ 'seo' ][ Seo::DESCRIPTION ] = !empty( $category->meta_desc ) ? $category->meta_desc : '';
      $this->params[ 'seo' ][ Seo::SEO_TEXT ] = !empty( $category->seo_text ) ? $category->seo_text : '';
      $this->params[ 'seo' ][ Seo::H1 ] = !empty( $category->h1 ) ? $category->h1 : $category->name;
      $this->params[ 'breadcrumbs' ][] = $category->name;
      
      echo ListView::widget([
          'dataProvider' => $dataProvider,
          'options'      => [
              'class' => 'blocks_2',
          ],
          'itemView'     => '_category_item',
          'layout'       => '{items}',
      ]);
4ca21c3e   Alexey Boroda   first commit
27
28
29
  ?>
  
  <div class="textile_bottom">
26cc2627   Eugeny Galkovskiy   123
30
      <div class="centered">
f2acc393   Alexey Boroda   -Seo widget integ...
31
32
33
34
35
36
37
          <h1 class="title1 left"><?php echo Seo::widget(['row' => Seo::H1]); ?></h1>
          <div class="simple-spoiler just-closed" style="height: 50px">
              <div class="spoiler-inner"><?php echo Seo::widget(['row' => Seo::SEO_TEXT]); ?></div>
          </div>
          <div class="just-more">
              <a href="#">Узнать больше</a>
          </div>
26cc2627   Eugeny Galkovskiy   123
38
      </div>
4ca21c3e   Alexey Boroda   first commit
39
  </div>