{% sw_extends '@Storefront/storefront/component/product/listing.html.twig' %}
{% block element_product_listing_pagination_nav_top %}
{% set config = element.fieldConfig.elements %}
{% set slot = cmsPage.firstElementOfType('product-listing') %}
<div class="cms-element-sidebar-filter">
{% block element_product_listing_filter_button %}
<button class="btn header-actions-btn filter-panel-wrapper-toggle"
type="button"
data-offcanvas-filter="true"
aria-haspopup="true"
aria-expanded="false"
aria-label="{{ "general.menuLink"|trans }}">
{{ "listing.filterTitleText"|trans }}
</button>
{% endblock %}
{% block element_sidebar_filter_panel %}
<div id="filter-panel-wrapper"
class="filter-panel-wrapper"
data-offcanvas-filter-content="true">
{% sw_include '@Storefront/storefront/component/listing/filter-panel.html.twig' with {
listing: slot.data.listing,
sidebar: block.sectionPosition == 'sidebar'
} %}
</div>
{% endblock %}
</div>
{% endblock %}
{% block element_product_listing_col %}
{% for product in searchResult %}
<div class="cms-listing-col col-sm-4">
{% block element_product_listing_box %}
{% sw_include '@Storefront/storefront/component/product/card/box.html.twig' with {
'layout': boxLayout,
'displayMode': displayMode
} %}
{% endblock %}
</div>
{% endfor %}
{% endblock %}
{% block element_product_listing_sorting %}
<div style="display: flex">
<span style="margin-right: 5px" class="sort-label">
{{"listing.sortBy"|trans|sw_sanitize}}
</span>
{% set current = searchResult.sorting %}
{% set sortings = searchResult.availableSortings %}
{% set config = { sorting: current } %}
{% if sortings|length > 1 %}
<div class="sorting" data-listing-sorting="true" data-listing-sorting-options='{{ config|json_encode }}'>
<select class="sorting custom-select" aria-label="{{ 'general.sortingLabel'|trans|striptags }}">
{% for sorting in sortings %}
{% set key = sorting.key %}
<option value="{{ key }}" {% if key == current %} selected{% endif %}>
{{ sorting.translated.label|sw_sanitize }}
</option>
{% endfor %}
</select>
</div>
{% endif %}
</div>
{% endblock %}