templates/front/theme1/partials/_navbar.html.twig line 1

Open in your IDE?
  1. <label for="menu-handler"><span></span><span></span><span></span></label>
  2. {% if menu_right %}
  3.     <nav class="primary-nav">
  4.         <ul>
  5.         {% for key,menu in menu_right %}
  6.                 {% if menu.type == 'aucun' %}
  7.                     {% set path_href = '#' %}       
  8.                 {% elseif menu.type == 'lien' %}
  9.                     {% set path_href = menu.url %}
  10.                 {% elseif menu.type == 'categorie' or menu.type == 'sous-categorie' or menu.type == 'Post' %}
  11.                     {% set path_href = path('page',{slug:menu.slug}) %}
  12.                 {% elseif menu.type == 'categorie-product' %}
  13.                     {% set path_href = path('list_produit',{slug:menu.slug}) %}
  14.                 {% elseif menu.type == 'list-faq' %}
  15.                     {% set path_href = path('list_faq',{slug:menu.slug}) %}
  16.                 {% elseif menu.type == 'plan-du-site'%}
  17.                     {% set path_href = path('plan_du_site') %}
  18.                 {% endif %} 
  19.                 {% if menu.child %}
  20.                         <li><a title="{{menu.title}}" href="{{path_href}}"  {% if menu.nofollow == true %}rel="nofollow"{% endif %} target="{{target[menu.target]}}">
  21.                         {% if iconesNavigation %}
  22.                         
  23.                             {% if menuDetails[key].icone is not empty %}
  24.                                 <img src="{{menuDetails[key].icone}}" alt="{{menu.title}}" class="icone" />
  25.                             {% endif %}
  26.                             {% if menuDetails[key].iconehover is not empty %}
  27.                                 <img src="{{menuDetails[key].iconehover}}" alt="{{menu.title}}" class="picto-hover" />
  28.                             {% endif %}
  29.                         {% endif %}
  30.                         
  31.                         {{menu.title}}</a>
  32.                             <ul>
  33.                             {% for item in menu.child %}
  34.                                 {% if item.type == 'aucun' %}
  35.                                     {% set path_child_href = '#' %}       
  36.                                 {% elseif item.type == 'lien' %}
  37.                                     {% set path_child_href = item.url %}
  38.                                 {% elseif item.type == 'categorie' or item.type == 'sous-categorie' or item.type == 'Post' %}
  39.                                     {% set path_child_href = path('page',{slug:item.slug}) %}
  40.                                 {% elseif item.type == 'categorie-product' %}
  41.                                     {% set path_child_href = path('list_produit',{slug:item.slug}) %}
  42.                                 {% elseif item.type == 'list-faq' %}
  43.                                     {% set path_child_href = path('list_faq',{slug:item.slug}) %}
  44.                                 {% elseif item.type == 'plan-du-site'%}
  45.                                     {% set path_child_href = path('plan_du_site') %}
  46.                                 {% endif %} 
  47.                                 
  48.                                 {% if menu.child2 %}
  49.                                     <li><a title="{{item.title}}" href="{{path_child_href}}" {% if item.nofollow == true %}rel="nofollow"{% endif %} target="{{target[item.target]}}">{{item.title}}</a>
  50.                                     <ul>
  51.                                     {% for item2 in menu.child2 %}
  52.                                         {% if item2.parent == item.id %}
  53.                                             {% if item2.type == 'aucun' %}
  54.                                                 {% set path_child_href2 = '#' %}       
  55.                                             {% elseif item2.type == 'lien' %}
  56.                                                 {% set path_child_href2 = item2.url %}
  57.                                             {% elseif item2.type == 'categorie' or item2.type == 'sous-categorie' or item2.type == 'Post' %}
  58.                                                 {% set path_child_href2 = path('page',{slug:item2.slug}) %}
  59.                                             {% elseif item2.type == 'categorie-product' %}
  60.                                                 {% set path_child_href2 = path('list_produit',{slug:item2.slug}) %}
  61.                                             {% elseif item2.type == 'list-faq' %}
  62.                                                 {% set path_child_href2 = path('list_faq',{slug:item2.slug}) %}
  63.                                             {% elseif item2.type == 'plan-du-site'%}
  64.                                                 {% set path_child_href2 = path('plan_du_site') %}
  65.                                             {% endif %} 
  66.                                             <li><a title="{{item2.title}}" href="{{path_child_href2}}" {% if item2.nofollow == true %}rel="nofollow"{% endif %} target="{{target[item2.target]}}">{{item2.title}}</a></li>
  67.                                         {% endif %} 
  68.                                     {% endfor %}
  69.                                     </ul>
  70.                                 </li>
  71.                                 {% else %}
  72.                                     <li><a title="{{item.title}}" href="{{path_child_href}}" {% if item.nofollow == true %}rel="nofollow"{% endif %} target="{{target[item.target]}}">
  73.                                     {% if iconesNavigation %}
  74.                         
  75.                                         {% if menuDetails[key].icone is not empty %}
  76.                                             <img src="{{menuDetails[key].icone}}" alt="{{menu.title}}" class="icone" />
  77.                                         {% endif %}
  78.                                         {% if menuDetails[key].iconehover is not empty %}
  79.                                             <img src="{{menuDetails[key].iconehover}}" alt="{{menu.title}}" class="picto-hover" />
  80.                                         {% endif %}
  81.                                     {% endif %}
  82.                                     {{item.title}}</a></li>
  83.                                 {% endif %}
  84.                             {% endfor %}
  85.                             </ul>
  86.                         </li>
  87.                     {% else %}
  88.                     <li><a title="{{menu.title}}" href="{{path_href}}"  {% if menu.nofollow == true %}rel="nofollow"{% endif %} target="{{target[menu.target]}}">
  89.                         {% if iconesNavigation %}
  90.                             {% if menuDetails[key].icone is not empty %}
  91.                                 <img src="{{menuDetails[key].icone}}" alt="{{menu.title}}" class="icone" />
  92.                             {% endif %}
  93.                             {% if menuDetails[key].iconehover is not empty %}
  94.                                 <img src="{{menuDetails[key].iconehover}}" alt="{{menu.title}}" class="picto-hover" />
  95.                             {% endif %}
  96.                         {% endif %}
  97.                     {{menu.title}}</a></li>
  98.                 {% endif %} 
  99.         {% endfor %} 
  100.     
  101.         </ul>
  102.     </nav>
  103. {% endif %}