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

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/layout/navigation/flyout.html.twig' %}
  2. {% block layout_navigation_flyout %}
  3.     {% set navTreeChildrens= navigationTree.children %}
  4.     {% set name = category.translated.name %}
  5.     {% block layout_navigation_flyout_bar %}
  6.     {% endblock %}
  7.     {% block layout_navigation_flyout_content %}
  8.         <div class="row navigation-flyout-content">
  9.         {% block layout_navigation_flyout_categories %}
  10.             <div class="{% if category.media %}col-3{% else %}col-3{% endif %} p-0">
  11.                 <div class="navigation-flyout-categories">
  12.                     {% block layout_navigation_flyout_categories_recoursion %}
  13.                         {% for treeItem in navTreeChildrens %}
  14.                             {% set isOpen = loop.index0 is same as(0) %}
  15.                             {% set category = treeItem.category %}
  16.                             {% set name = category.translated.name %}
  17.                             {# @deprecated tag:v6.5.0 - Use "category.id" directly instead. #}
  18.                             {% set categorId = category.id %}
  19.                             {% block layout_main_navigation_menu_item %}
  20.                                 {% if category.type == 'folder' %}
  21.                                     <div class="nav-link main-navigation-link"
  22.                                                 data-flyout-category-trigger="{{ category.id }}"
  23.                                          title="{{ name }}">
  24.                                         <div class="main-navigation-link-text">
  25.                                             <span itemprop="name">{{ name }}</span>
  26.                                         </div>
  27.                                     </div>
  28.                                 {% else %}
  29.                                     <a class="nav-link main-navigation-link {% if isOpen %} is-open{% endif %}"
  30.                                        href="{{ category_url(category) }}"
  31.                                        itemprop="url"
  32.                                        data-flyout-category-trigger="{{ category.id }}"
  33.                                             {% if category_linknewtab(category) %}target="_blank"{% endif %}
  34.                                        title="{{ name }}">
  35.                                         <div class="main-navigation-link-text">
  36.                                             <span itemprop="name">{{ name }}</span>
  37.                                         </div>
  38.                                     </a>
  39.                                 {% endif %}
  40.                             {% endblock %}
  41.                         {% endfor %}
  42.                     {% endblock %}
  43.                 </div>
  44.             </div>
  45.         {% endblock %}
  46.         {% for treeItem in navTreeChildrens %}
  47.             {% set isOpen = loop.index0 is same as(0) %}
  48.             {% set customFields =  treeItem.category.customFields %}
  49.             {% set banner = customFields.custom_category_menu_banner_img %}
  50.             {% if banner %}
  51.                 {% set iconMediaId = customFields.custom_category_menu_banner_img %}
  52.                 {% set media = searchMedia([iconMediaId], context.context) %}
  53.                 {% set icon = media.get(iconMediaId) %}
  54.             {% endif %}
  55.             <div class="navigation-flyout-category-wrapper col-9 row m-0 p-0 {% if isOpen %}is-open{% endif %}"
  56.                  data-flyout-category-id="{{ treeItem.category.id }}"
  57.             >
  58.                 <div class="row m-0">
  59.                     <div class="category-card-section {% if banner %} col-8 {% else %} col-12 {% endif %} {% if treeItem.children == false %}d-none {% endif%} ">
  60.                         <span class="main-category-name">{{ treeItem.category.translated.name }}</span>
  61.                         <div class="row m-0">
  62.                             {% for subcategory in treeItem.children %}
  63.                                 {% if subcategory.category.mediaId %}
  64.                                     {% set imgMediaId  = subcategory.category.mediaId %}
  65.                                     {% set media = searchMedia([imgMediaId], context.context) %}
  66.                                     {% set img = media.get(imgMediaId) %}
  67.                                 {% endif %}
  68.                                 <div class="col-4 category-card">
  69.                                     <a href="{{ category_url(subcategory.category) }}" class="category-card-wrapper">
  70.                                         {% sw_thumbnails 'product-image-thumbnails' with {
  71.                                             media: img,
  72.                                             sizes: {
  73.                                                 'xs': '218px',
  74.                                                 'sm': '218px',
  75.                                                 'md': '218px',
  76.                                                 'lg': '218px',
  77.                                                 'xl': '218px',
  78.                                             },
  79.                                         attributes: {
  80.                                             'class': 'category-card-image',
  81.                                                 'alt': ( subcategory.category.translated.name  ?: ''),
  82.                                             }
  83.                                         } %}
  84.                                         <span class="category-card-name">{{ subcategory.category.translated.name }}</span>
  85.                                     </a>
  86.                                 </div>
  87.                             {% endfor %}
  88.                         </div>
  89.                     </div>
  90.                     {% block layout_navigation_flyout_teaser %}
  91.                         {% if banner %}
  92.                         <div class="category-banner {% if treeItem.children == false %}col-12 {% else %} col-4{% endif %}">
  93.                             <div class="navigation-flyout-teaser">
  94.                                 <span class="category-banner-headline">{{ customFields.custom_category_menu_banner_headline }}</span>
  95.                                 {% block layout_navigation_flyout_teaser_image %}
  96.                                     <a class="navigation-flyout-teaser-image-container {% if treeItem.children == false %}mw-100 {% endif %} "
  97.                                        href="{{ customFields.custom_category_menu_banner_url }}">
  98.                                         <img src="{{ icon.url }}" class="navigation-flyout-teaser-image"
  99.                                              data-object-fit="cover">
  100.                                     </a>
  101.                                 {% endblock %}
  102.                             </div>
  103.                         </div>
  104.                         {% endif %}
  105.                     {% endblock %}
  106.                 </div>
  107.             </div>
  108.         {% endfor %}
  109.     {% endblock %}
  110.     </div>
  111. {% endblock %}