Blame view

frontend/views/layouts/_services.php 1011 Bytes
9fbe1412   Alexey Boroda   -Services in menu...
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
  <?php
      
      use artbox\core\models\PageCategory;
      use yii\helpers\Url;
      use yii\web\View;
      
      /**
       * @var View           $this
       * @var PageCategory[] $pageCategories
       */
      
      if (!empty($pageCategories)) {
          ?>
        <ul class="_dropdown">
            <?php foreach ($pageCategories as $category) { ?>
              <li>
                <a href="#"><?= $category->lang->title ?></a>
                  <?php if (!empty($category->pages)) { ?>
                    <ul>
                        <?php foreach ($category->pages as $page) { ?>
                          <li><a href="<?= Url::to(
                                  [
                                      'page/view',
                                      'alias' => $page->lang->alias,
                                  ]
                              ) ?>"><?= $page->lang->title ?></a></li>
                        <?php } ?>
                    </ul>
                  <?php } ?>
              </li>
            <?php } ?>
        </ul>
      <?php }