custom/static-plugins/LdsWintercornTheme/src/Resources/views/storefront/component/sorting.html.twig line 1

Open in your IDE?
  1. {% set config = { sorting: current } %}
  2. {% set showSorting = (slot.config.showSorting.value is defined) ? slot.config.showSorting.value : true %}
  3. {% if showSorting and sortings|length > 1 %}
  4.     <div class="sorting-wrapper row justify-content-between">
  5.         <div class="sorting-pre-label">{{ "lwt.listing.sorting.preLabel"|trans|striptags }}</div>
  6.         <div class="sorting" data-listing-sorting="true" data-listing-sorting-options='{{ config|json_encode }}'>
  7.             <select class="sorting {{ formSelectClass }}" aria-label="{{ 'general.sortingLabel'|trans|striptags }}">
  8.                 {% for sorting in sortings %}
  9.                     {% set key = sorting.key %}
  10.                     <option value="{{ key }}" {% if key == current %} selected {% endif %}>{{ sorting.translated.label|sw_sanitize }}</option>
  11.                 {% endfor %}
  12.             </select>
  13.             {% sw_icon 'arrow-medium-down' style {'pack': 'solid', 'size': 'xs', 'class': 'filter-panel-item-toggle'} %}
  14.         </div>
  15.     </div>
  16. {% endif %}