{% for key, list in menu %}
{% if list is not empty %}
<div class="column">
<ul class="Layout_Topmenu">
<li>
<div class="Layout_Topmenu_title firstMenu">
<span>
{% if key == 'products' %}
Produits
{% elseif key == 'commercial_agreements' %}
{% if list.url is defined and list.url is not empty %}
<a href="{{ list.url }}">Accords commerciaux</a>
{% else %}
Accords commerciaux
{% endif %}
{% elseif key == 'partners' %}
{% if list.url is defined and list.url is not empty %}
<a href="{{ list.url }}">Partenaires / Innovation</a>
{% else %}
Partenaires / Innovation
{% endif %}
{% endif %}
</span>
<button class="Layout_Topmenu--buttonMenu"></button>
</div>
<ul class="Layout_Topmenu--menu {% if key == 'partners' %} Layout_Topmenu--menu__partners {% endif %}">
{% if key == 'products' %}
{% for item in list %}
{% if item.parent == null %}
<li>
<a class="Layout_Topmenu_title" href="{{ path('sylius_shop_product_index', {'slug': item.slug, '_locale': item.translation.locale}) }}">{{ item.name }}</a>
<ul class="Layout_Topmenu--menu active" {{ sylius_test_html_attribute('vertical-menu') }}>
{% for child in item.children %}
<li class="item">
{% if child.slug is defined and child.slug is not empty %}
<a href="{{ path('sylius_shop_product_index', {'slug': child.slug, '_locale': child.translation.locale}) }}">{{ child.name }}</a>
{% else %}
{{ child.name }}
{% endif %}
</li>
{% endfor %}
</ul>
</li>
{% endif %}
{% endfor %}
{% else %}
{% for parent in list.parents %}
<li>
<div class="Layout_Topmenu_title">
{% if parent.url is defined and parent.url is not empty %}
<a href="{{ parent.url }}">{{ parent.name }}</a>
{% else %}
{{ parent.name }}
{% endif %}
</div>
{% if parent.children is defined %}
<ul class="Layout_Topmenu--menu active" {{ sylius_test_html_attribute('vertical-menu') }}>
{% for child in parent.children %}
<li class="item">
{% if child.url is defined and child.url is not empty %}
<a href="{{ child.url }}"{{ sylius_test_html_attribute('vertical-menu-item') }}>
{{ child.name }}
</a>
{% else %}
{{ child.name }}
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
{% endif %}
</ul>
</li>
</ul>
</div>
{% endif %}
{% endfor %}