templates/frontend-eforum/_partials/header-mobile.html.twig line 1

Open in your IDE?
  1. {% if categories is not defined %}
  2.     {% set categories = getEforumCategories() %}
  3. {% endif %}
  4. {% if productTypes is not defined %}
  5.     {% set productTypes = getEforumProductTypes() %}
  6. {% endif %}
  7. <nav class="mobile-nav" id="mobile-header">
  8.     <ul class="mobile-nav__list">
  9.         {% if categories is not empty %}
  10.             {% for category in categories %}
  11.                 <li class="mobile-nav__item mobile-nav__item--has-submenu">
  12.                     <a class="mobile-nav__link"
  13.                        href="{{ url('category_show', {category : category.categorySlug }) }}">
  14.                         {{ category.categoryName }}
  15.                     </a>
  16.                     {% if category.children is not empty or
  17.                         (productTypes is not empty and productTypes[category.id] is defined) %}
  18.                         <a class="mobile-nav__link mobile-nav__link-expand"
  19.                            href="">
  20.                             rozwiń
  21.                         </a>
  22.                         <ul class="mobile-nav__list">
  23.                             {% if productTypes is not empty and productTypes[category.id] is defined %}
  24.                                 <li class="mobile-nav__item mobile-nav__item--has-submenu">
  25.                                     <a class="mobile-nav__link mobile-nav__link-heading" href="">Typy produktów</a>
  26.                                     <ul class="mobile-nav__list">
  27.                                         {% for productType in productTypes[category.id] %}
  28.                                             <li class="mobile-nav__item">
  29.                                                 <a class="mobile-nav__link"
  30.                                                    href="{{ url('category_show', {category :category.categorySlug, ('t_' ~ productType.slug): 1}) }}">
  31.                                                     {{ productType.name }}
  32.                                                 </a>
  33.                                             </li>
  34.                                         {% endfor %}
  35.                                     </ul>
  36.                                 </li>
  37.                             {% endif %}
  38.                             {% if category.children is not empty %}
  39.                                 <li class="mobile-nav__item mobile-nav__item--has-submenu">
  40.                                     <a class="mobile-nav__link mobile-nav__link-heading" href="">Obszary tematyczne</a>
  41.                                     <ul class="mobile-nav__list">
  42.                                         {% for sub_category in category.children %}
  43.                                             <li class="mobile-nav__item">
  44.                                                 <a class="mobile-nav__link"
  45.                                                    href="{{ url('category_show', {category : sub_category.categorySlug}) }}">
  46.                                                     {{ sub_category.categoryName }}
  47.                                                 </a>
  48.                                             </li>
  49.                                         {% endfor %}
  50.                                     </ul>
  51.                                 </li>
  52.                             {% endif %}
  53.                         </ul>
  54.                     {% endif %}
  55.                 </li>
  56.             {% endfor %}
  57.         {% endif %}
  58.     </ul>
  59. </nav>