Blame view

frontend/views/catalog/brand.php 1.59 KB
4253cbec   root   first commit
1
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
  <?php
  /** @var $this \yii\web\View */
  /** @var $productProvider \yii\data\ActiveDataProvider */
  /** @var $brandProvider \yii\data\ActiveDataProvider */
  
  
  use yii\helpers\Url;
  use yii\widgets\Breadcrumbs;
  use yii\web\View;
  use common\modules\product\helpers\ProductHelper;
  
  $this->title =  $brand->name;
  $this->params['breadcrumbs'][] = ['label' => Yii::t('products', 'Brands'), 'url' => ['catalog/brands']];
  $this->params['breadcrumbs'][] = $brand->name;
  
  $this->params['seo']['fields']['name'] = $brand->name;
  
  $this->registerCssFile (Yii::getAlias('@web/css/ion.rangeSlider.css'));
  $this->registerCssFile (Yii::getAlias('@web/css/ion.rangeSlider.skinHTML5.css'));
  $this->registerJsFile (Yii::getAlias('@web/js/ion.rangeSlider.js'));
  ?>
  
  
  
  <div class="loyout">
  
      <div class="content">
          <h1><?= $brand->name ?></h1>
          <div class="products pn">
              <ul>
                  <?php foreach($productProvider->models as $product) :?>
                      <?php require(__DIR__ .'/product_item.php')?>
                  <?php endforeach?>
              </ul>
              <div class="both"></div>
          </div>
          <?php if ($productProvider->totalCount > $productProvider->pagination->pageSize) :?>
              <?= \yii\widgets\LinkPager::widget([
                  'pagination' => $productProvider->pagination,
                  'options' => ['class' => 'pagination pull-right'],
                  'registerLinkTags' => true,
              ]);
              ?>
          <?php endif?>
          <div class="both"></div>
      </div>
      <div class="both"></div>
  
      <?= \common\modules\product\widgets\lastProducts::widget()?>
  </div>