custom/plugins/GrimmTheme/src/Resources/views/storefront/element/cms-element-sidebar-filter.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/element/cms-element-sidebar-filter.html.twig' %}
  2. {# append category name and filtered product amount above parent #}
  3. {% block element_sidebar_filter %}
  4.     {% set currentCategory = page.header.navigation.active %}
  5.     {% if currentCategory.customFields.s360_listingviewswitch_remove_h1 != true %}
  6.         <div class="cms-element-sidebar__additional-info">
  7.             <h1 class="cms-element-sidebar__additional-info--category">
  8.                 {% if currentCategory.customFields and currentCategory.customFields.custom_category_configuration_display_name %}
  9.                     {{ currentCategory.customFields.custom_category_configuration_display_name }}
  10.                 {% else %}
  11.                     {{ currentCategory.translated.name }} 
  12.                 {% endif %}
  13.                 {# amount of product for category and filters will be inserted in listing so it updates on reload #}
  14.             </h1>
  15.         </div>
  16.     {% endif %}
  17.     {# actual filters start here #}
  18.     {% set config = element.fieldConfig.elements %}
  19.     {% set slot = page.cmsPage.firstElementOfType('product-listing') %}
  20.     {% set listing = slot.data.listing %}
  21.     {% if slot.data.listing.aggregations.elements|length > 0 %}
  22.         <div class="row">
  23.             <div class="cms-element-sidebar-filter col-6 col-lg-12">
  24.                 {% block element_product_listing_filter_button %}
  25.                         <button class="btn header-actions-btn filter-panel-wrapper-toggle filter-panel-wrapper-toggle--filter"
  26.                             type="button"
  27.                             data-offcanvas-filter="true"
  28.                             aria-haspopup="true"
  29.                             aria-expanded="false"
  30.                             aria-label="{{ "general.menuLink"|trans }}">
  31.                         <span class="filter-panel-wrapper-toggle__text">{{ "listing.filter"|trans }}</span>
  32.                             {% block element_product_listing_filter_button_icon %}
  33.                                 {% sw_icon 'pfeil_rechts' style {'pack': 'grimmtheme', 'namespace': 'GrimmTheme', 'size': 'xs'} %}
  34.                             {% endblock %}
  35.                         </button>
  36.                 {% endblock %}
  37.                 {% block element_sidebar_filter_panel %}
  38.                     {{ parent() }}
  39.                 {% endblock %}
  40.             </div>
  41.         </div>
  42.     {% endif %}
  43. {% endblock %}