vendor/shopware/storefront/Resources/views/storefront/component/sorting.html.twig line 1

Open in your IDE?
  1. {% set config = { sorting: current } %}
    {% set showSorting = (slot.config.showSorting.value is defined) ? slot.config.showSorting.value : true %}
    
    {% if showSorting and sortings|length > 1 %}
        <div class="sorting" data-listing-sorting="true" data-listing-sorting-options='{{ config|json_encode }}'>
            <select class="sorting {{ formSelectClass }}" 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 %}