custom/plugins/Tuerschild_2/src/Resources/views/storefront/layout/navigation/navigation.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/layout/navigation/navigation.html.twig' %}
  2. {% block layout_main_navigation %}
  3.     {% set flyout_categories_trigger = "main-navigation-flyout" %}
  4.     {% set flyout_themen_trigger = "main-themen-flyout" %}
  5.     <div class="main-navigation"
  6.          id="mainNavigation"
  7.          data-flyout-menu="true">
  8.         {% block layout_main_navigation_navbar %}
  9.             <div class="container">
  10.                 {% block layout_main_navigation_menu %}
  11.                     <nav class="nav main-navigation-menu"
  12.                          itemscope="itemscope"
  13.                          itemtype="http://schema.org/SiteNavigationElement">
  14.                         {% set homeLabel = context.salesChannel.translated.homeName|default("general.homeLink"|trans) %}
  15.                         {% block layout_main_navigation_menu_home %}
  16.                         {% endblock %}
  17.                         {% block layout_main_navigation_menu_items %}
  18.                             {% if page.product is defined %}
  19.                                 {% set activePath = page.product.categoryTree %}
  20.                             {% else %}
  21.                                 {% set activePath = page.header.navigation.active.path %}
  22.                             {% endif %}
  23.                             {% for treeItem in page.header.navigation.tree %}
  24.                                 {% set category = treeItem.category %}
  25.                                 {% set name = category.translated.name %}
  26.                                 {# @deprecated tag:v6.5.0 - Use "category.id" directly instead. #}
  27.                                 {% set categorId = category.id %}
  28.                                 {% block layout_main_navigation_menu_item %}
  29.                                     {% if category.type == 'folder' %}
  30.                                         <div class="nav-link main-navigation-link"
  31.                                                 {% if treeItem.children|length > 0 %}
  32.                                                     data-flyout-menu-trigger="{{ category.id }}"
  33.                                                 {% endif %}
  34.                                              title="{{ name }}">
  35.                                             <div class="main-navigation-link-text">
  36.                                                 <span itemprop="name">{{ name }}</span>
  37.                                             </div>
  38.                                         </div>
  39.                                     {% else %}
  40.                                         <a class="nav-link main-navigation-link nav-link-{{ loop.index }}"
  41.                                            href="{{ category_url(category) }}"
  42.                                            itemprop="url"
  43.                                                 {% if treeItem.children|length > 0 %} data-flyout-menu-trigger="{{ category.id }}"{% endif %}
  44.                                                 {% if category_linknewtab(category) %}target="_blank"{% endif %}
  45.                                            title="{{ name }}">
  46.                                             <div class="main-navigation-link-text menu-link">
  47.                                                 {% if name is same as("Produkte") %}
  48.                                                     <span class="hamburger-menu"></span>
  49.                                                 {% else %}
  50.                                                     {% sw_icon 'arrow_down'  style {
  51.                                                         'namespace': 'Tuerschild_2',
  52.                                                     } %}
  53.                                                 {% endif %}
  54.                                                 <span itemprop="name" class="hamburger-menu-text">{{ name }}</span>
  55.                                             </div>
  56.                                         </a>
  57.                                     {% endif %}
  58.                                 {% endblock %}
  59.                             {% endfor %}
  60.                         {% endblock %}
  61.                     </nav>
  62.                 {% endblock %}
  63.             </div>
  64.         {% endblock %}
  65.         {% block layout_main_navigation_menu_flyout_wrapper %}
  66.             {% set navigationChildrenCount = 0 %}
  67.             {% for treeItem in page.header.navigation.tree %}
  68.                 {% if treeItem.category.childCount > 0 %}
  69.                     {% set navigationChildrenCount = navigationChildrenCount + 1 %}
  70.                 {% endif %}
  71.             {% endfor %}
  72.             {% if navigationChildrenCount > 0 %}
  73.                 {% block layout_main_navigation_menu_flyout_container %}
  74.                     <div class="navigation-flyouts" data-menu-categories-switcher="true">
  75.                         {% block layout_main_navigation_menu_flyouts %}
  76.                             {% for treeItem in page.header.navigation.tree %}
  77.                                 {% if treeItem.children|length > 0 %}
  78.                                     {% block layout_main_navigation_menu_flyout %}
  79.                                         <div class="navigation-flyout"
  80.                                              data-flyout-menu-id="{{ treeItem.category.id }}"
  81.                                         >
  82.                                             <div class="container">
  83.                                                 {% block layout_main_navigation_menu_flyout_include %}
  84.                                                     {% sw_include '@Storefront/storefront/layout/navigation/flyout.html.twig' with {navigationTree: treeItem, level: level+1, page: page} only %}
  85.                                                 {% endblock %}
  86.                                             </div>
  87.                                         </div>
  88.                                     {% endblock %}
  89.                                 {% endif %}
  90.                             {% endfor %}
  91.                         {% endblock %}
  92.                     </div>
  93.                 {% endblock %}
  94.             {% endif %}
  95.         {% endblock %}
  96.     </div>
  97. {% endblock %}