{% 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 form-group custom-dropdown" data-listing-sorting="true" data-listing-sorting-options='{{ config|json_encode }}'>
<select style="background-color: white !important; color:black !important; margin-top:0px !important" 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 %}
<style>
.form-group {
margin-bottom: 0px !important;
}
.custom-select{
margin-bottom: 15px !important;
}
</style>