templates/menu/menu_mobile.html.twig line 1

Open in your IDE?
  1. {% macro menu_links(parentId, links, liClass = "main-menu__item", aclass = "main-menu__link") %}
  2.     {% if links.parents[parentId]|length > 0 %}
  3.         {% for itemId in links.parents[parentId] %}
  4.         {% set item = links.items[itemId] %}
  5.             <li  data-mobile-menu-item>
  6.                 {% if links.parents[itemId] is defined %}
  7.                     <div class="accordion">
  8.                         <div class="accordion-item">
  9.                             <h2 class="accordion-header" id="panelsStayOpen-headingOne">
  10.                             <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#panelsStayOpen-collapseOne" aria-expanded="true" aria-controls="panelsStayOpen-collapseOne">
  11.                                 {{ item.getTitle() }}
  12.                             </button>
  13.                             </h2>
  14.                             <div id="panelsStayOpen-collapseOne" class="accordion-collapse collapse" aria-labelledby="panelsStayOpen-headingOne">
  15.                                 <div class="accordion-body">
  16.                                     <ul class="list-unstyled fast-inner-overlay-menu">
  17.                                     {% import _self as m %}    
  18.                                     {{ m.menu_links(itemId, links, 'menu__item', 'menu_link') }}
  19.                                     </ul>
  20.                                 </div>
  21.                             </div>
  22.                         </div>
  23.                     </div>
  24.                 {% endif %}
  25.                 {% if links.parents[itemId] is not defined %}
  26.                     <a  href="{{ path(item.getRouteName()) }}" data-mobile-menu-trigger>{{ item.getTitle() }}</a>
  27.                 {% endif %}
  28.             </li>
  29.         {% endfor %}
  30.     {% endif %}
  31. {% endmacro %}
  32. <ul class="list-unstyled fast-overlay-menu">
  33.    {{ _self.menu_links(0, links) }}
  34. </ul>