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

Open in your IDE?
  1. {% set path_href = '/' %}
  2. <label for="menu-handler"><span></span><span></span><span></span></label>
  3. {% if menu_right %}
  4.     <nav class="primary-nav">
  5.         <ul>
  6.              {% for key,menu in menu_right %}
  7.                     {% set path_href = menu.path %} 
  8.                     {% if menu.child %}
  9.                             <li>
  10.                                 <a title="{{menu.title}}" href="{{path_href}}"  {% if menu.nofollow == true %}rel="nofollow"{% endif %} target="{{target[menu.target]}}">
  11.                                     {% if iconesNavigation %}
  12.                                         {% if menu.icone %}
  13.                                             <img src="{{menu.icone}}" alt="{{menu.title}}" class="icone" />
  14.                                         {% endif %}
  15.                                         {% if menu.icone_hover %}
  16.                                             <img src="{{menu.icone_hover}}" alt="{{menu.title}}" class="picto-hover" />
  17.                                         {% endif %}
  18.                                     {% endif %}
  19.                                     {{menu.title}}
  20.                                 </a>
  21.                                 <ul>
  22.                                 {% for item in menu.child %}
  23.                                      {% set path_child_href = item.path %} 
  24.                                     
  25.                                     {% if menu.child2 %}
  26.                                         <li>
  27.                                         <a title="{{item.title}}" href="{{path_child_href}}" {% if item.nofollow == true %}rel="nofollow"{% endif %} target="{{target[item.target]}}">{{item.title}}</a>
  28.                                         <ul>
  29.                                             {% for item2 in menu.child2 %}
  30.                                                 {% if item2.parent == item.id %}
  31.                                                     {% set path_child_href2 = item2.path %} 
  32.                                                     <li><a title="{{item2.title}}" href="{{path_child_href2}}" {% if item2.nofollow == true %}rel="nofollow"{% endif %} target="{{target[item2.target]}}">{{item2.title}}</a></li>
  33.                                                 {% endif %} 
  34.                                             {% endfor %}
  35.                                         </ul>
  36.                                     </li>
  37.                                     {% else %}
  38.                                         <li><a title="{{item.title}}" href="{{path_child_href}}" {% if item.nofollow == true %}rel="nofollow"{% endif %} target="{{target[item.target]}}">
  39.                                         {% if iconesNavigation %}
  40.                             
  41.                                             {% if item.icone %}
  42.                                                 <img src="{{item.icone}}" alt="{{item.title}}" class="icone" />
  43.                                             {% endif %}
  44.                                             {% if item.icone_hover %}
  45.                                                 <img src="{{item.icone_hover}}" alt="{{item.title}}" class="picto-hover" />
  46.                                             {% endif %}
  47.                                         {% endif %}
  48.                                         {{item.title}}</a></li>
  49.                                     {% endif %}
  50.                                 {% endfor %}
  51.                                 </ul>
  52.                             </li>
  53.                         {% else %}
  54.                         <li>
  55.                             <a title="{{menu.title}}" href="{{path_href}}"  {% if menu.nofollow == true %}rel="nofollow"{% endif %} target="{{target[menu.target]}}">
  56.                                 {% if iconesNavigation %}
  57.                                     {% if menu.icone %}
  58.                                         <img src="{{menu.icone}}" alt="{{menu.title}}" class="icone" />
  59.                                     {% endif %}
  60.                                     {% if menu.icone_hover %}
  61.                                         <img src="{{menu.icone_hover}}" alt="{{menu.title}}" class="picto-hover" />
  62.                                     {% endif %}
  63.                                 {% endif %}
  64.                                 {{menu.title}}
  65.                             </a>
  66.                         </li>
  67.                     {% endif %}
  68.              {% endfor %}
  69.         </ul>
  70.     </nav>
  71. {% endif %}