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