custom/plugins/KayloBasicTheme/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" data-listing-sorting="true" data-listing-sorting-options='{{ config|json_encode }}'>
  5.         <select class="sorting custom-select" aria-label="{{ 'general.sortingLabel'|trans|striptags }}">
  6.             {% for sorting in sortings %}
  7.                 {% set key = sorting.key %}
  8.                 <option value="{{ key }}"{% if key == current %} selected{% endif %}>{{ sorting.translated.label|sw_sanitize }}</option>
  9.             {% endfor %}
  10.         </select>
  11.     </div>
  12. {% endif %}