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

Open in your IDE?
  1. {% set path_href = '/' %}
    <label for="menu-handler"><span></span><span></span><span></span></label>
    {% if menu_right %}
        <nav class="primary-nav">
            <ul>
                 {% for key,menu in menu_right %}
                        {% set path_href = menu.path %} 
    
                        {% if menu.child %}
                                <li>
                                    <a title="{{menu.title}}" href="{{path_href}}"  {% if menu.nofollow == true %}rel="nofollow"{% endif %} target="{{target[menu.target]}}">
                                        {% if iconesNavigation %}
                                            {% if menu.icone %}
                                                <img src="{{menu.icone}}" alt="{{menu.title}}" class="icone" />
                                            {% endif %}
    
                                            {% if menu.icone_hover %}
                                                <img src="{{menu.icone_hover}}" alt="{{menu.title}}" class="picto-hover" />
                                            {% endif %}
                                        {% endif %}
                                        {{menu.title}}
                                    </a>
    
                                    <ul>
                                    {% for item in menu.child %}
                                         {% set path_child_href = item.path %} 
                                        
                                        {% if menu.child2 %}
                                            <li>
                                            <a title="{{item.title}}" href="{{path_child_href}}" {% if item.nofollow == true %}rel="nofollow"{% endif %} target="{{target[item.target]}}">{{item.title}}</a>
                                            <ul>
                                                {% for item2 in menu.child2 %}
                                                    {% if item2.parent == item.id %}
                                                        {% set path_child_href2 = item2.path %} 
    
                                                        <li><a title="{{item2.title}}" href="{{path_child_href2}}" {% if item2.nofollow == true %}rel="nofollow"{% endif %} target="{{target[item2.target]}}">{{item2.title}}</a></li>
                                                    {% endif %} 
                                                {% endfor %}
                                            </ul>
                                        </li>
                                        {% else %}
                                            <li><a title="{{item.title}}" href="{{path_child_href}}" {% if item.nofollow == true %}rel="nofollow"{% endif %} target="{{target[item.target]}}">
                                            {% if iconesNavigation %}
                                
                                                {% if item.icone %}
                                                    <img src="{{item.icone}}" alt="{{item.title}}" class="icone" />
                                                {% endif %}
    
                                                {% if item.icone_hover %}
                                                    <img src="{{item.icone_hover}}" alt="{{item.title}}" class="picto-hover" />
                                                {% endif %}
    
                                            {% endif %}
                                            {{item.title}}</a></li>
                                        {% endif %}
                                    {% endfor %}
                                    </ul>
                                </li>
                            {% else %}
                            <li>
                                <a title="{{menu.title}}" href="{{path_href}}"  {% if menu.nofollow == true %}rel="nofollow"{% endif %} target="{{target[menu.target]}}">
                                    {% if iconesNavigation %}
                                        {% if menu.icone %}
                                            <img src="{{menu.icone}}" alt="{{menu.title}}" class="icone" />
                                        {% endif %}
                                        {% if menu.icone_hover %}
                                            <img src="{{menu.icone_hover}}" alt="{{menu.title}}" class="picto-hover" />
                                        {% endif %}
                                    {% endif %}
                                    {{menu.title}}
                                </a>
                            </li>
                        {% endif %}
                 {% endfor %}
            </ul>
        </nav>
    {% endif %}