{% sw_extends '@Storefront/storefront/layout/navigation/categories.html.twig' %}
{% block layout_navigation_categories_item_link %}
{% set emcgnCategoryImg = treeItem.category.media %}
{% if treeItem.category.type != 'folder' %}
{% if emcgnCategoryImg.url %}
<a class="nav-item nav-link navigation-flyout-link is-level-{{ level }}{% if id is same as(activeId) %} active{% endif %}"
href="{% if link %}{{ link }}{% else %}{{ seoUrl('frontend.navigation.page', { navigationId: id }) }}{% endif %}"
itemprop="url"
title="{{ name }}">
{% sw_thumbnails 'cms-image-thumbnails' with {
media: emcgnCategoryImg,
sizes: {
'default': '150px'
},
attributes: {
'class': 'emcgn-nav-item-img',
'alt': treeItem.category.name,
'title': treeItem.category.name
}
} %}
</a>
{% endif %}
{% endif %}
{{ parent() }}
{% endblock %}