Blame view

common/modules/product/widgets/views/submenu.php 2.84 KB
4253cbec   root   first commit
1
  <div class="menu_item">

871a7349   Administrator   big commti
2
      <?= \yii\helpers\Html::a($rootCategory->name, ['catalog/category', 'category' => $rootCategory], ['class' => 'submenu_button '. $rootClass])?>

4253cbec   root   first commit
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
      <div class="submenu">

          <ul class="categories">

              <li class="sub_cat"><span>Популярные категории</span>

                  <?php if(!empty($populary)) :?>

                      <div class="sub_cat_content">

                          <div class="content_items">

                              <?php foreach($populary as $_item) :?>

                                  <div class="content_item"><a href="<?= \yii\helpers\Url::to(['catalog/category', 'category' => $_item])?>">

                                          <div valign="top" class="picture">

                                              <?php if (empty($_item->image)) :?>

                                              <img valign="top" src="/images/no_photo.png">

                                              <?php else :?>

                                                  <?= $_item->imageUrl ? \common\components\artboximage\ArtboxImageHelper::getImage($_item->imageUrl, 'mainmenu') : ''?>

                                              <?php endif?>

                                          </div>

871a7349   Administrator   big commti
18
                                          <div class="title"><?= $_item->name?></div>

4253cbec   root   first commit
19
20
21
22
23
24
25
26
                                      </a></div>

                              <?php endforeach?>

                          </div>

                      </div>

                  <?php endif?>

              </li>

          <?php foreach($items as $item) :?>

              <li class="sub_cat">

871a7349   Administrator   big commti
27
                  <span><?= $item['item']->name?></span>

4253cbec   root   first commit
28
29
30
31
32
33
34
35
36
37
38
39
                  <?php if(!empty($item['children'])) :?>

                  <div class="sub_cat_content">

                      <div class="content_items">

                          <?php foreach($item['children'] as $_item) :?>

                          <div class="content_item"><a href="<?= \yii\helpers\Url::to(['catalog/category', 'category' => $_item['item']])?>">

                              <div valign="top" class="picture">

                                  <?php if (empty($_item['item']->image)) :?>

                                      <img valign="top" src="/images/no_photo.png">

                                  <?php else :?>

                                      <?= $_item['item']->imageUrl ? \common\components\artboximage\ArtboxImageHelper::getImage($_item['item']->imageUrl, 'mainmenu') : ''?>

                                  <?php endif?>

                              </div>

871a7349   Administrator   big commti
40
                              <div class="title"><?= $_item['item']->name?></div>

4253cbec   root   first commit
41
42
43
44
45
46
47
48
49
50
                          </a></div>

                          <?php endforeach?>

                      </div>

                  </div>

                  <?php endif?>

              </li>

          <?php endforeach ?>

          </ul>

      </div>

  </div>