Blame view

frontend/views/category/brand.php 1.91 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
      use common\modules\product\models\Category;
      use yii\data\ActiveDataProvider;
      use yii\web\View;
      use yii\widgets\ListView;
      use common\widgets\Seo;
      
      /**
       * @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' ][] = [
          'label' => $category->parent->name,
          'url'   => [
              'category/index',
              'id' => $category->parent->category_id,
          ],
      ];
      $this->params[ 'breadcrumbs' ][] = $category->name;
4ca21c3e   Alexey Boroda   first commit
25
26
27
28
29
30
31
32
33
  ?>
  
  
  <div class="col-md-12 brand">
      <div class="brand_logo">
          <img src="<?php echo $category->getBrandImageUrl(); ?>">
      </div>
      <div class="brand_title1"><?php echo $category->first_text; ?></div>
      <div class="brand_title2"><?php echo $category->second_text; ?></div>
f2acc393   Alexey Boroda   -Seo widget integ...
34
      
4ca21c3e   Alexey Boroda   first commit
35
      <?php
f2acc393   Alexey Boroda   -Seo widget integ...
36
37
38
39
40
          echo ListView::widget([
              'dataProvider' => $dataProvider,
              'itemView'     => '_brand_item',
              'layout'       => '{items}',
          ])
4ca21c3e   Alexey Boroda   first commit
41
      ?>
f2acc393   Alexey Boroda   -Seo widget integ...
42
      
68f0eb36   Eugeny Galkovskiy   123
43
44
      <div class="col-md-12">
          <div class="about_brand">
f2acc393   Alexey Boroda   -Seo widget integ...
45
          <h1 class="title4"><?php echo Seo::widget(['row' => Seo::H1]); ?></h1>
987739f1   Alexey Boroda   -Simple spoiler
46
          <div class="simple-spoiler just-closed" style="height: 50px">
f2acc393   Alexey Boroda   -Seo widget integ...
47
              <div class="spoiler-inner"><?php echo Seo::widget(['row' => Seo::SEO_TEXT]); ?></div>
987739f1   Alexey Boroda   -Simple spoiler
48
49
50
51
          </div>
          <div class="just-more">
              <a href="#">Узнать больше</a>
          </div>
68f0eb36   Eugeny Galkovskiy   123
52
          </div>
4ca21c3e   Alexey Boroda   first commit
53
54
      </div>
  </div>