custom/static-plugins/NdVoorwindenTheme/src/Resources/views/storefront/layout/navigation/navigation-enrichment.html.twig line 1

Open in your IDE?
  1. {# This element is used in both the offcanvas navigation AND the flyout navigation on desktop. #}
  2. {% set categoryName = category.name ?? category.translated.name %}
  3. {% set additionalMenuId = categoryName|lower %}
  4. {% if page.header.extensions.additional_menus.get('inspiration-'~additionalMenuId) %}
  5.     <div class="navigation-offcanvas-inspiration {% if location == 'offcanvas' %}{% else %}flyout{% endif %}">
  6.         <h4 class="navigation-title {% if location == 'offcanvas' %}text-xl mb-2{% else %}h2 mb-4 uppercase{% endif %}">{{ "themeGlobal.navigationInspiration"|trans|sw_sanitize }}</h4>
  7.         <ul class="{% if location == 'offcanvas' %}divide-y divide-grey-400{% endif %}">
  8.             {% for item in page.header.extensions.additional_menus.get('inspiration-'~additionalMenuId).elements %}
  9.                 {% set isActive = item.id == activeId %}
  10.                 {% set hasChildren = item.visibleChildCount > 0 %}
  11.                 {% set url = category_url(item) %}
  12.                 {% set name = item.translated.name %}
  13.                 {% set img = item.media %}
  14.                 {% set isRoot = activeId == context.salesChannel.navigationCategoryId %}
  15.                 <li class="navigation-offcanvas-list-item">
  16.                     <a class="navigation-offcanvas-link flex items-center grid-gap-4 nav-item nav-link hover:text-black{% if isActive %} active{% endif %}{% if location == 'flyout' %} py-2{% endif %}"
  17.                        href="{{ url }}"
  18.                        itemprop="url"
  19.                        {% if category_linknewtab(item) %}target="_blank"{% endif %}
  20.                        title="{{ name }}">
  21.                         <div class="flex justify-between w-full items-center {% if location == 'offcanvas' %}py-4{% else %}py-1{% endif %}">
  22.                             <span itemprop="name">{{ name }}</span>
  23.                             <span class="navigation-offcanvas-link-icon js-navigation-offcanvas-loading-icon text-black">
  24.                             {% sw_icon 'chevron-right' style { 'pack':'theme-icons', 'size': '12' } %}
  25.                         </span>
  26.                         </div>
  27.                     </a>
  28.                 </li>
  29.             {% endfor %}
  30.         </ul>
  31.     </div>
  32. {% endif %}
  33. {% if page.header.extensions.additional_menus.get('department-'~additionalMenuId) %}
  34.     <div class="navigation-offcanvas-department {% if location == 'offcanvas' %}py-6{% else %}flyout{% endif %}">
  35.         <h4 class="navigation-title {% if location == 'offcanvas' %}text-xl mb-2{% else %}h2 mb-4 uppercase{% endif %}">{{ "themeGlobal.navigationDepartment"|trans|sw_sanitize }}</h4>
  36.         <ul class="{% if location == 'offcanvas' %}divide-y divide-grey-400{% endif %}">
  37.             {% for item in page.header.extensions.additional_menus.get('department-'~additionalMenuId).elements %}
  38.                 {% set isActive = item.id == activeId %}
  39.                 {% set hasChildren = item.visibleChildCount > 0 %}
  40.                 {% set url = category_url(item) %}
  41.                 {% set name = item.translated.name %}
  42.                 {% set img = item.media %}
  43.                 {% set isRoot = activeId == context.salesChannel.navigationCategoryId %}
  44.                 <li class="navigation-offcanvas-list-item">
  45.                     <a class="navigation-offcanvas-link flex items-center grid-gap-4 nav-item nav-link hover:text-black{% if isActive %} active{% endif %}{% if location == 'flyout' %} py-2{% endif %}"
  46.                        href="{{ url }}"
  47.                        itemprop="url"
  48.                        {% if category_linknewtab(item) %}target="_blank"{% endif %}
  49.                        title="{{ name }}">
  50.                         <div class="flex justify-between w-full items-center {% if location == 'offcanvas' %}py-4{% else %}py-1{% endif %}">
  51.                             <span itemprop="name">{{ name }}</span>
  52.                             <span class="navigation-offcanvas-link-icon js-navigation-offcanvas-loading-icon text-black">
  53.                             {% sw_icon 'chevron-right' style { 'pack':'theme-icons', 'size': '12' } %}
  54.                         </span>
  55.                         </div>
  56.                     </a>
  57.                 </li>
  58.             {% endfor %}
  59.         </ul>
  60.     </div>
  61. {% endif %}
  62. {% if page.header.extensions.additional_menus.get('brands-'~additionalMenuId) %}
  63.     <div class="navigation-offcanvas-brands {% if location == 'offcanvas' %}py-4{% else %}flyout{% endif %}">
  64.         <h4 class="navigation-title {% if location == 'offcanvas' %}text-lg mb-2{% else %}h2 mb-4 uppercase{% endif %}">{{ "themeGlobal.navigationBrands"|trans|sw_sanitize }}</h4>
  65.         {% if location == 'offcanvas' %}
  66.         <ul class="flex flex-wrap grid-gap-2 max-w-[600px]">
  67.             {% else %}
  68.             {% endif %}
  69.             {% for item in page.header.extensions.additional_menus.get('brands-'~additionalMenuId).elements %}
  70.                 {% set url = category_url(item) %}
  71.                 {% if location == 'offcanvas' %}<li class="navigation-offcanvas-list-item">{% endif %}
  72.                 <a class="navigation-offcanvas-link nav-item nav-link {% if location == 'offcanvas' %}flex items-center grid-gap-4{% else %}leading-9{% endif %}"
  73.                    href="{{ url }}"
  74.                    itemprop="url"
  75.                    title="{{ item.translated.name }}">
  76.                     <span class="hover:text-black" itemprop="brand">{{ item.translated.name }}</span>
  77.                     {% if location == 'offcanvas' %}
  78.                         {% if not loop.last %}
  79.                             <span class="seperator inline-block mx-1">&bull;</span>
  80.                         {% endif %}
  81.                     {% else %}
  82.                         <span class="seperator inline-block mx-1">&bull;</span>
  83.                     {% endif %}
  84.                 </a>
  85.                 {% if location == 'offcanvas' %}</li>{% endif %}
  86.             {% endfor %}
  87.             {% if location == 'offcanvas' %}</ul>{% endif %}
  88.         <a class="text-black underline mt-2 {% if location == 'offcanvas' %}font-medium block{% else %}{% endif %}"
  89.            href="/merken/"
  90.            title="{{ "themeGlobal.showAllBrands"|trans|sw_sanitize }}">
  91.             {{ "themeGlobal.showAllBrands"|trans|sw_sanitize }}
  92.         </a>
  93.     </div>
  94. {% endif %}
  95. {% if page.header.extensions.additional_menus.get('ladies-'~additionalMenuId) %}
  96.     <div class="navigation-offcanvas-ladies {% if location == 'offcanvas' %}{% else %}flyout{% endif %}">
  97.         <h4 class="navigation-title {% if location == 'offcanvas' %}text-xl mb-2{% else %}h2 mb-4 uppercase{% endif %}">{{ "themeGlobal.navigationLadies"|trans|sw_sanitize }}</h4>
  98.         <ul class="{% if location == 'offcanvas' %}divide-y divide-grey-400{% endif %}">
  99.             {% for item in page.header.extensions.additional_menus.get('ladies-'~additionalMenuId).elements %}
  100.                 {% set isActive = item.id == activeId %}
  101.                 {% set hasChildren = item.visibleChildCount > 0 %}
  102.                 {% set url = category_url(item) %}
  103.                 {% set name = item.translated.name %}
  104.                 {% set img = item.media %}
  105.                 {% set isRoot = activeId == context.salesChannel.navigationCategoryId %}
  106.                 <li class="navigation-offcanvas-list-item">
  107.                     <a class="navigation-offcanvas-link flex items-center grid-gap-4 nav-item nav-link hover:text-black{% if isActive %} active{% endif %}{% if location == 'flyout' %} py-2{% endif %}"
  108.                        href="{{ url }}"
  109.                        itemprop="url"
  110.                        {% if category_linknewtab(item) %}target="_blank"{% endif %}
  111.                        title="{{ name }}">
  112.                         <div class="flex justify-between w-full items-center {% if location == 'offcanvas' %}py-4{% endif %}">
  113.                             <span itemprop="name">{{ name }}</span>
  114.                             <span class="navigation-offcanvas-link-icon js-navigation-offcanvas-loading-icon text-black">
  115.                             {% sw_icon 'chevron-right' style { 'pack':'theme-icons', 'size': '12' } %}
  116.                         </span>
  117.                         </div>
  118.                     </a>
  119.                 </li>
  120.             {% endfor %}
  121.         </ul>
  122.     </div>
  123. {% endif %}
  124. {% if page.header.extensions.additional_menus.get('gentlemen-'~additionalMenuId) %}
  125.     <div class="navigation-offcanvas-gentlemen {% if location == 'offcanvas' %}{% else %}flyout{% endif %}">
  126.         <h4 class="navigation-title {% if location == 'offcanvas' %}text-xl mb-2{% else %}h2 mb-4 uppercase{% endif %}">{{ "themeGlobal.navigationGentlemen"|trans|sw_sanitize }}</h4>
  127.         <ul class="{% if location == 'offcanvas' %}divide-y divide-grey-400{% endif %}">
  128.             {% for item in page.header.extensions.additional_menus.get('gentlemen-'~additionalMenuId).elements %}
  129.                 {% set isActive = item.id == activeId %}
  130.                 {% set hasChildren = item.visibleChildCount > 0 %}
  131.                 {% set url = category_url(item) %}
  132.                 {% set name = item.translated.name %}
  133.                 {% set img = item.media %}
  134.                 {% set isRoot = activeId == context.salesChannel.navigationCategoryId %}
  135.                 <li class="navigation-offcanvas-list-item">
  136.                     <a class="navigation-offcanvas-link flex items-center grid-gap-4 nav-item nav-link hover:text-black{% if isActive %} active{% endif %}{% if location == 'flyout' %} py-2{% endif %}"
  137.                        href="{{ url }}"
  138.                        itemprop="url"
  139.                        {% if category_linknewtab(item) %}target="_blank"{% endif %}
  140.                        title="{{ name }}">
  141.                         <div class="flex justify-between w-full items-center {% if location == 'offcanvas' %}py-4{% endif %}">
  142.                             <span itemprop="name">{{ name }}</span>
  143.                             <span class="navigation-offcanvas-link-icon js-navigation-offcanvas-loading-icon text-black">
  144.                             {% sw_icon 'chevron-right' style { 'pack':'theme-icons', 'size': '12' } %}
  145.                         </span>
  146.                         </div>
  147.                     </a>
  148.                 </li>
  149.             {% endfor %}
  150.         </ul>
  151.     </div>
  152. {% endif %}
  153. {% if page.header.extensions.additional_menus.get('kids-'~additionalMenuId) %}
  154.     <div class="navigation-offcanvas-kids {% if location == 'offcanvas' %}{% else %}flyout{% endif %}">
  155.         <h4 class="navigation-title {% if location == 'offcanvas' %}text-xl mb-2{% else %}h2 mb-4 uppercase{% endif %}">{{ "themeGlobal.navigationKids"|trans|sw_sanitize }}</h4>
  156.         <ul class="{% if location == 'offcanvas' %}divide-y divide-grey-400{% endif %}">
  157.             {% for item in page.header.extensions.additional_menus.get('kids-'~additionalMenuId).elements %}
  158.                 {% set isActive = item.id == activeId %}
  159.                 {% set hasChildren = item.visibleChildCount > 0 %}
  160.                 {% set url = category_url(item) %}
  161.                 {% set name = item.translated.name %}
  162.                 {% set img = item.media %}
  163.                 {% set isRoot = activeId == context.salesChannel.navigationCategoryId %}
  164.                 <li class="navigation-offcanvas-list-item">
  165.                     <a class="navigation-offcanvas-link flex items-center grid-gap-4 nav-item nav-link hover:text-black{% if isActive %} active{% endif %}{% if location == 'flyout' %} py-2{% endif %}"
  166.                        href="{{ url }}"
  167.                        itemprop="url"
  168.                        {% if category_linknewtab(item) %}target="_blank"{% endif %}
  169.                        title="{{ name }}">
  170.                         <div class="flex justify-between w-full items-center {% if location == 'offcanvas' %}py-4{% endif %}">
  171.                             <span itemprop="name">{{ name }}</span>
  172.                             <span class="navigation-offcanvas-link-icon js-navigation-offcanvas-loading-icon text-black">
  173.                             {% sw_icon 'chevron-right' style { 'pack':'theme-icons', 'size': '12' } %}
  174.                         </span>
  175.                         </div>
  176.                     </a>
  177.                 </li>
  178.             {% endfor %}
  179.         </ul>
  180.     </div>
  181. {% endif %}
  182. {% if page.header.extensions.additional_menus.get('sport-'~additionalMenuId) %}
  183.     <div class="navigation-offcanvas-sport {% if location == 'offcanvas' %}{% else %}flyout{% endif %}">
  184.         <h4 class="navigation-title {% if location == 'offcanvas' %}text-xl mb-2{% else %}h2 mb-4 uppercase{% endif %}">{{ "themeGlobal.navigationSport"|trans|sw_sanitize }}</h4>
  185.         <ul class="{% if location == 'offcanvas' %}divide-y divide-grey-400{% endif %}">
  186.             {% for item in page.header.extensions.additional_menus.get('sport-'~additionalMenuId).elements %}
  187.                 {% set isActive = item.id == activeId %}
  188.                 {% set hasChildren = item.visibleChildCount > 0 %}
  189.                 {% set url = category_url(item) %}
  190.                 {% set name = item.translated.name %}
  191.                 {% set img = item.media %}
  192.                 {% set isRoot = activeId == context.salesChannel.navigationCategoryId %}
  193.                 <li class="navigation-offcanvas-list-item">
  194.                     <a class="navigation-offcanvas-link flex items-center grid-gap-4 nav-item nav-link hover:text-black{% if isActive %} active{% endif %}{% if location == 'flyout' %} py-2{% endif %}"
  195.                        href="{{ url }}"
  196.                        itemprop="url"
  197.                        {% if category_linknewtab(item) %}target="_blank"{% endif %}
  198.                        title="{{ name }}">
  199.                         <div class="flex justify-between w-full items-center {% if location == 'offcanvas' %}py-4{% endif %}">
  200.                             <span itemprop="name">{{ name }}</span>
  201.                             <span class="navigation-offcanvas-link-icon js-navigation-offcanvas-loading-icon text-black">
  202.                             {% sw_icon 'chevron-right' style { 'pack':'theme-icons', 'size': '12' } %}
  203.                         </span>
  204.                         </div>
  205.                     </a>
  206.                 </li>
  207.             {% endfor %}
  208.         </ul>
  209.     </div>
  210. {% endif %}