templates/layouts/layouts_front/temp.html.twig line 1

Open in your IDE?
  1. {# Pages du premier niveau #}
  2.         {% for page in pages %}
  3.             {# Si il n'y a pas de page parent, menu de premier niveau #}
  4.             {% if page.pparent == 0 and page.pcacher_menu != 1 %}
  5.                 {% set hasChild = 0 %}
  6.                 {# Vérification si sous menu #}
  7.                 {% for pageSub in pages %}
  8.                     {% if pageSub.pparent == page.page_id and pageSub.pcacher_menu != 1 %}
  9.                         {% set hasChild = 1 %}
  10.                     {% endif %}
  11.                 {% endfor %}
  12.                 <li class="navContenu nav-item dropdown col"{% if page.page_id == 13 %}
  13.                     onclick="openProductMenu();"
  14.                     {% endif %}style="">
  15.                     {% set menu = page %}
  16.                     {% embed 'layouts/layouts_front/nav/nav_page_menu.html.twig' with {'level': 1} %}{% endembed %}
  17.                     {# Si il y a des sous menu niveau 1, on les affiche #}
  18.                     {% if hasChild == 1 %}
  19.                         <div class="dropdown-menu {% if logoInMenu == 'top_center' %}dropdown-menu-logo-top{% endif %}"
  20.                              aria-labelledby="dropdown-undefined"
  21.                              style="top: 0 !important; background: transparent !important;">
  22.                             <div class="dropdown">
  23.                                 {# Pages du sous menu niveau 1 #}
  24.                                 {% for pageSub in pages %}
  25.                                     {# Si la page parent correspond #}
  26.                                     {% if pageSub.pparent == page.page_id and pageSub.pcacher_menu != 1 %}
  27.                                         {% set hasChild = 0 %}
  28.                                         {% for pageSubSub in pages %}
  29.                                             {% if pageSubSub.pparent == pageSub.page_id and pageSubSub.pcacher_menu != 1 %}
  30.                                                 {% set hasChild = 1 %}
  31.                                             {% endif %}
  32.                                         {% endfor %}
  33.                                         {% set menu = pageSub %}
  34.                                         {% embed 'layouts/layouts_front/nav/nav_page_menu.html.twig' with {'level': 2} %}{% endembed %}
  35.                                         {# Si il y a des sous menu niveau 2, on les affiche #}
  36.                                         {% if hasChild == 1 %}
  37.                                             <div class="dropdown-menu dropdown-submenu dropdown-submenu-level-3 {% if logoInMenu == 'top_center' %}dropdown-submenu-logo-top{% endif %}"
  38.                                                  aria-labelledby="dropdown-undefined">
  39.                                                 {# Pages du sous menu niveau 2 #}
  40.                                                 {% for pageSubSub in pages %}
  41.                                                     {# Si la page parent correspond #}
  42.                                                     {% if pageSubSub.pparent == pageSub.page_id and pageSubSub.pcacher_menu != 1 %}
  43.                                                         {% set menu = pageSubSub %}
  44.                                                         {% set hasChild = 0 %}
  45.                                                         {% embed 'layouts/layouts_front/nav/nav_page_menu.html.twig' with {'level': 3} %}{% endembed %}
  46.                                                     {% endif %}
  47.                                                 {% endfor %}
  48.                                             </div>
  49.                                         {% endif %}
  50.                                     {% endif %}
  51.                                 {% endfor %}
  52.                             </div>
  53.                         </div>
  54.                     {% endif %}
  55.                 </li>
  56.             {% endif %}
  57.         {% endfor %}