templates/home/blocks/custom/subnav.html.twig line 1

Open in your IDE?
  1. {% if menu is defined %}
  2.     {% set menus = menu.children %}
  3. {% endif %}
  4. {% set thislevel = level + 1 %}
  5. <ul class="nav-list nav-level-{{ thislevel }}">
  6.     {% for child in menus %}
  7.         {% set pageMenu = twig_service.getPageById(child.id) %}
  8.         {% if pageMenu and pageMenu.slugs[app.request.getLocale()] is defined %}
  9.             <li class="nav-item active" id="{{ child.id }}">
  10.                 <a class="nav-link" href="{{ path('front_index_page', {'slug': pageMenu.slugs[app.request.getLocale()]}) }}">
  11.                     {{ pageMenu.name }}
  12.                 </a>
  13.                 {% if child.children|length > 0 %}
  14.                     {% include "home/blocks/custom/subnav.html.twig" with {menu : child, level : thislevel} %}
  15.                 {% endif %}
  16.             </li>
  17.         {% endif %}
  18.     {% endfor %}
  19. </ul>