templates/front/_common/_menu.html.twig line 1

Open in your IDE?
  1. <ul class="navbar-nav d-flex justify-content-end align-items-baseline w-100 mx-3 mx-lg-0">
  2. {% for route,item in menu %}
  3.     {% if route == "devenir_conseiller_" %}
  4.         {% if route == current_route %}    
  5.             <li class="nav-item mx-lg-3"><a class="btn btn-primary {{ item.class }}" href="# "><span>{{ item.title|upper }}</span></a></li>
  6.         {% else %}
  7.             <li class="nav-item mx-lg-3 py-0"><a class="btn btn-primary" href="{{ path( route ) }}"><span>{{ item.title|upper }}</span></a></li>
  8.          {% endif %}
  9.     {% else %}
  10.         
  11.         {% if route in sous_menus|keys %}
  12.             <li class="nav-item dropdown">
  13.                 <a class="nav-link s_menu {{ item.class }}" href="{{ path( route ) }}" >{{ item.title|upper }}</a>
  14.                 <div class="dropdown-menu bg-dark">
  15.                     {% for label,param in sous_menus[route] %}
  16.                         <a class="dropdown-item {{ param.class }}" href="{{ path( route ) }}?{{ param['key'] }}={{ param['value'] }}">{{ label }}</a>
  17.                     {% endfor %}
  18.                 </div>
  19.              </li>    
  20.         {% else %}
  21.             <li class="nav-item ">
  22.                 {% if route == "devenir_conseiller" %}
  23.                     {# <a class="btn btn-outline-light mt-2 mt-lg-0 {{ item.class }} " href="{{ path( route ) }}">{{ item.title|upper }}</a> #}
  24.                     <a class="btn btn-outline-light mt-2 mt-lg-0 {{ item.class }} " href="https://embarquement.sublimons.com/accueil" target="_blank">{{ item.title|upper }}</a>
  25.                 {% else %}
  26.                     <a class="nav-link {{ item.class }} " href="{{ path( route ) }}">{{ item.title|upper }}</a>
  27.                 {% endif %}
  28.             </li>
  29.         {% endif %}
  30.     {% endif %}
  31. {% endfor %} 
  32. </ul>