{% 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 {% if forloop.first %}hover{% endif %} {% if menu_item.has_children %}has-children{% endif %} {% if menu_item.depth == 1 %}head{% else %}child{% endif %} dropdown pages-dropdown">
    <a class="nav-link" href="{{ menu_item.get_absolute_url }}">
        {% if menu_item.image %}{% lazy_picture menu_item.image "75x75" selector="icon-dropdown-lazy" %}{% endif %} {{ menu_item.name }}
    </a>
    <ul class="dropdown-menu icon-inner-menu">
{% else %}
<li class="nav-item child">
    <a class="nav-link" href="{{ menu_item.get_absolute_url }}">
        {% if menu_item.image %}{% lazy_picture menu_item.image "75x75" selector="icon-dropdown-lazy" %}{% endif %} {{ menu_item.name }}
    </a>
</li>
{% endif %}
{% for close in menu_item.num_to_close %}
   </ul>
</li>
{% endfor %}
{% endwith %}
{% endfor %}
<span class="icon_dropdown_devider"></span>
{% endif %}