{% macro item(taxon, isChild) %}
{% import _self as macros %}
{% if taxon.children|length > 0 %}
<li class="{% if not isChild -%}navItem{% endif %}" {{ sylius_test_html_attribute('menu-item') }}>
<a class="navLink" href="{{ path('sylius_shop_product_index', {'slug': taxon.slug, '_locale': taxon.translation.locale}) }}" >
<span> {{ taxon.name }}</span>
</a>
</li>
{% else %}
<li class="navItem">
<a href="{{ path('sylius_shop_product_index', {'slug': taxon.slug, '_locale': taxon.translation.locale}) }}"
class="navLink {% if not isChild -%}nav-item{% endif %}" {{ sylius_test_html_attribute('menu-item') }}><span>{{ taxon.name }} </span>
</a>
</li>
{% endif %}
{% endmacro %}
{% import _self as macros %}
{% if taxons|length > 0 %}
<ul class="onglets" id="mainNavbar">
{% for taxon in taxons %}
{{ macros.item(taxon) }}
{% endfor %}
{# <li class="navItem">#}
{# <a href="/page/demontage" }}" class="navLink" title=" {{'app.header.demontage' |trans}}"> {{'app.header.demontage' |trans}}</a>#}
{# </li>#}
<li class="navItem visible-980">
<a href="#" class="navLink rech-link" > {{'sylius.ui.search' |trans}}</a>
</li>
</ul>
{% endif %}