templates/app/_inc/_menu.html.twig line 1

Open in your IDE?
  1. {% import 'app/_inc/macros.html.twig' as m %}
  2. <nav class="nav-main">
  3.     <ul class="nav-list">
  4.         <li class="collapse-nav level-1">
  5.             <button class="collapse-button">
  6.                 {{ 'nav.act'|trans|raw }}
  7.             </button>
  8.             <ul>
  9.                 {% for category in categories %}
  10.                     {% if category.childrens|length > 0 %}
  11.                         <li class="collapse-nav level-2">
  12.                             <button class="collapse-button"><span>{{ category.translate.title }}</span></button>
  13.                             <ul>
  14.                                 {% for child in category.childrens|filter(child => child.isDeleted is same as(false)) %}
  15.                                     {{ m.li(child.translate.title, path('activiteShow', {'id':child.id})) }}
  16.                                 {% endfor %}
  17.                             </ul>
  18.                         </li>
  19.                     {% else %}
  20.                         <li class="collapse-nav level-2">
  21.                             <a class="collapse-button"
  22.                                href="{{ path('activiteShow', {'id':category.id}) }}">{{ category.translate.title }}</a>
  23.                         </li>
  24.                     {% endif %}
  25.                 {% endfor %}
  26.             </ul>
  27.         </li>
  28.         {{ m.li('Nos rĂ©alisations', path('realisations')) }}
  29.         {{ m.li('nav.contact', path('contact')) }}
  30.     </ul>
  31. </nav>