vendor/creativect/twepa-theme/src/Resources/views/storefront/layout/navigation/navigation.html.twig line 14

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/layout/navigation/navigation.html.twig' %}
  2. {% block layout_main_navigation_menu %}
  3.     <nav class="nav main-navigation-menu"
  4.          itemscope="itemscope"
  5.          itemtype="http://schema.org/SiteNavigationElement">
  6.         {% set homeLabel = context.salesChannel.translated.homeName|default("general.homeLink"|trans) %}
  7.         {% block layout_main_navigation_menu_home %}{% endblock %}
  8.         {% block layout_main_navigation_menu_items %}
  9.             {{ parent() }}
  10.         {% endblock %}
  11.     </nav>
  12. {% endblock %}
  13. {% block layout_main_navigation_menu_item %}
  14.     {% if category.type == 'folder' %}
  15.         <div class="nav-link main-navigation-link"
  16.                 {% if treeItem.children|length > 0 %}
  17.                     data-flyout-menu-trigger="{{ category.id }}"
  18.                 {% endif %}
  19.              title="{{ name }}">
  20.             <div class="main-navigation-link-text">
  21.                 <span itemprop="name">{{ name }}</span>
  22.             </div>
  23.         </div>
  24.     {% else %}
  25.         <a class="nav-link main-navigation-link{% if category.id == page.header.navigation.active.id or category.id in activePath %} active{% endif %}"
  26.            href="{{ category_url(category) }}"
  27.            itemprop="url"
  28.            {% if treeItem.children|length > 0 %}data-flyout-menu-trigger="{{ category.id }}"{% endif %}
  29.                 {% if category_linknewtab(category) %}target="_blank"{% endif %}
  30.            title="{{ name }}">
  31.             {% set iconId = category.translated.customFields.category_icons_icon %}
  32.             {% set mediaCollection =  searchMedia([iconId], context.context) %}
  33.             {% set iconMedia = mediaCollection.get(iconId) %}
  34.             <img src="{{ iconMedia.url }}"/>
  35.             <div class="main-navigation-link-text">
  36.                 <span itemprop="name">{{ name }}</span>
  37.             </div>
  38.         </a>
  39.     {% endif %}
  40. {% endblock %}