{% load i18n ocyan_thumbnail %}
{% if menu_items %}
{% for menu_item in menu_items %}
{% with category_icon=menu_item.category.icons.first %}        
{% if menu_item.has_children %}
<li class="nav-item has_children">
    <a class="nav-link category-label" data-name="{{ menu_item.name|safe }}" data-href="{{ menu_item.get_absolute_url }}" tabindex="-1">
        <span>{% trans "Show everything in" %}</span>{{ menu_item.name }}
    </a>
    <ul class="menu-level">
{% else %}
<li class="nav-item child">
    <a class="nav-link child-category" href="{{ menu_item.get_absolute_url }}" tabindex="-1">
        {{ menu_item.name }}
    </a>
</li>
{% endif %}
{% for close in menu_item.num_to_close %}
   </ul>
</li>
{% endfor %}
{% endwith %}
{% endfor %}
{% endif %}