custom/plugins/ChespackTwoTheme/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. {# Use SW standard template with custom changes #}
  3. {% block layout_navigation_flyout %}
  4.     {% set category = navigationTree.category %}
  5.     {% set name = category.translated.name %}
  6.     {% block layout_navigation_flyout_bar %}
  7.         <div class="row navigation-flyout-bar">
  8.             {% block layout_navigation_flyout_bar_category %}
  9.                 <div class="col">
  10.                     <div class="navigation-flyout-category-link">
  11.                         {% block layout_navigation_flyout_bar_category_link %}
  12.                             {% if category.type == 'page' %}
  13.                                 <a class="nav-link"
  14.                                    href="{{ seoUrl('frontend.navigation.page', { navigationId: category.id }) }}"
  15.                                    itemprop="url"
  16.                                    title="{{ name }}">
  17.                                     {% block layout_navigation_flyout_bar_category_link_text %}
  18.                                         {{ "general.toCategory"|trans|sw_sanitize }} {{ name }}
  19.                                         {% sw_icon 'arrow-right' style {
  20.                                             'color': 'primary',
  21.                                             'pack':'solid'
  22.                                         } %}
  23.                                     {% endblock %}
  24.                                 </a>
  25.                             {% endif %}
  26.                         {% endblock %}
  27.                     </div>
  28.                 </div>
  29.             {% endblock %}
  30.             {% block layout_navigation_flyout_bar_close %}
  31.                 <div class="col-auto">
  32.                     <div class="navigation-flyout-close js-close-flyout-menu">
  33.                         {% block layout_navigation_flyout_bar_close_content %}
  34.                             {% block layout_utilities_offcanvas_close_icon %}
  35.                                 {% sw_icon 'x' %}
  36.                             {% endblock %}
  37.                         {% endblock %}
  38.                     </div>
  39.                 </div>
  40.             {% endblock %}
  41.         </div>
  42.     {% endblock %}
  43.     {% block layout_navigation_flyout_content %}
  44.         {% set customFields = category.translated.customFields %}
  45.         <div class="row navigation-flyout-content{% if customFields.chespack_category_cta_active_1 == true or customFields.chespack_category_cta_active_2 == true %}{% else %} navigation-flyout-content-no-teaser{% endif %}">
  46.             {% block layout_navigation_flyout_categories %}
  47.                 <div class="{% if customFields.chespack_category_cta_active_1 == true or customFields.chespack_category_cta_active_2 == true %}col-7{% else %}col{% endif %}">
  48.                     <div class="navigation-flyout-categories">
  49.                         {% block layout_navigation_flyout_categories_recoursion %}
  50.                             {% sw_include '@Storefront/storefront/layout/navigation/categories.html.twig' with {
  51.                                 navigationTree: navigationTree.children,
  52.                                 navigationMedia: category.media,
  53.                                 page: page
  54.                             } only %}
  55.                         {% endblock %}
  56.                     </div>
  57.                 </div>
  58.             {% endblock %}
  59.             {# Added category CTA-teasers #}
  60.             {% block layout_navigation_flyout_teaser %}
  61.                 {% if customFields.chespack_category_cta_active_1 == true
  62.                     or customFields.chespack_category_cta_active_2 == true %}
  63.                     <div class="col-5">
  64.                         <div class="navigation-flyout-teaser">
  65.                             {% block layout_navigation_flyout_teaser_1 %}
  66.                                 {% if customFields.chespack_category_cta_active_1 == true %}
  67.                                     <div class="navigation-flyout-teaser-cta-1">
  68.                                         {% if customFields.chespack_category_cta_link_1 is not empty %}
  69.                                             <a class="navigation-flyout-teaser-link"
  70.                                                href="{{ customFields.chespack_category_cta_link_1 }}"
  71.                                                {% if customFields.chespack_category_cta_link_new_window_1 %}target="_blank"{% endif %}
  72.                                                title="{{ customFields.chespack_category_cta_title_1 }}">
  73.                                         {% endif %}
  74.                                             <div class="navigation-flyout-teaser-texts">
  75.                                                {% if customFields.chespack_category_cta_title_1 %}
  76.                                                    <div class="navigation-flyout-teaser-title h4">
  77.                                                        {{ customFields.chespack_category_cta_title_1 }}
  78.                                                    </div>
  79.                                                 {% endif %}
  80.                                                 {% if customFields.chespack_category_cta_text_1 %}
  81.                                                    <div class="navigation-flyout-teaser-text">
  82.                                                        {{ customFields.chespack_category_cta_text_1 }}
  83.                                                    </div>
  84.                                                 {% endif %}
  85.                                             </div>
  86.                                             {% if categoryMediaFirst is not empty %}
  87.                                                 <div class="img-wrap">
  88.                                                     {% sw_thumbnails 'navigation-flyout-teaser-image-thumbnails' with {
  89.                                                         media: categoryMediaFirst,
  90.                                                         sizes: {
  91.                                                             'default': '250px'
  92.                                                         },
  93.                                                         attributes: {
  94.                                                             'alt': (customFields.chespack_category_cta_title_1 ?: ''),
  95.                                                             'title': (customFields.chespack_category_cta_title_1 ?: '')
  96.                                                         }
  97.                                                     } %}
  98.                                                 </div>
  99.                                             {% endif %}
  100.                                             {% sw_icon 'arrow-head-right' %}
  101.                                         {% if customFields.chespack_category_cta_link_1 is not empty %}
  102.                                             </a>
  103.                                         {% endif %}
  104.                                     </div>
  105.                                 {% endif %}
  106.                             {% endblock %}
  107.                             {% block layout_navigation_flyout_teaser_2 %}
  108.                                 {% if customFields.chespack_category_cta_active_2 == true %}
  109.                                     <div class="navigation-flyout-teaser-cta-2">
  110.                                         {% if customFields.chespack_category_cta_link_2 is not empty %}
  111.                                             <a class="navigation-flyout-teaser-link"
  112.                                                href="{{ customFields.chespack_category_cta_link_2 }}"
  113.                                                {% if customFields.chespack_category_cta_link_new_window_2 %}target="_blank"{% endif %}
  114.                                                title="{{ customFields.chespack_category_cta_title_2 }}">
  115.                                         {% endif %}
  116.                                             <div class="navigation-flyout-teaser-texts">
  117.                                                {% if customFields.chespack_category_cta_title_2 %}
  118.                                                    <div class="navigation-flyout-teaser-title h4">
  119.                                                        {{ customFields.chespack_category_cta_title_2 }}
  120.                                                    </div>
  121.                                                 {% endif %}
  122.                                             </div>
  123.                                             {% if categoryMediaSecond is not empty %}
  124.                                                 <div class="img-wrap">
  125.                                                     {% sw_thumbnails 'navigation-flyout-teaser-image-thumbnails' with {
  126.                                                         media: categoryMediaSecond,
  127.                                                         sizes: {
  128.                                                             'default': '250px'
  129.                                                         },
  130.                                                         attributes: {
  131.                                                             'alt': (customFields.chespack_category_cta_title_2 ?: ''),
  132.                                                             'title': (customFields.chespack_category_cta_title_2 ?: '')
  133.                                                         }
  134.                                                     } %}
  135.                                                 </div>
  136.                                             {% endif %}
  137.                                             {% if customFields.chespack_category_cta_text_2 %}
  138.                                                 <div class="navigation-flyout-teaser-text h4">
  139.                                                     {{ customFields.chespack_category_cta_text_2 }}
  140.                                                 </div>
  141.                                             {% endif %}
  142.                                             {% sw_icon 'arrow-head-right' %}
  143.                                         {% if customFields.chespack_category_cta_link_2 is not empty %}
  144.                                             </a>
  145.                                         {% endif %}
  146.                                     </div>
  147.                                 {% endif %}
  148.                             {% endblock %}
  149.                         </div>
  150.                     </div>
  151.                 {% endif %}
  152.             {% endblock %}
  153.         </div>
  154.     {% endblock %}
  155. {% endblock %}