vendor/shopware/storefront/Resources/views/storefront/component/listing/filter/filter-property-select.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/component/listing/filter/filter-multi-select.html.twig' %}
  2. {% if dataPluginSelectorOptions is not defined %}
  3.     {% set dataPluginSelectorOptions = {
  4.         name: name,
  5.         propertyName: propertyName,
  6.         snippets: {
  7.             disabledFilterText: 'listing.disabledFilterTooltip'|trans|sw_sanitize
  8.         }
  9.     } %}
  10. {% endif %}
  11. {% block component_filter_multi_select_list_item %}
  12.     <li class="filter-multi-select-list-item filter-property-select-list-item">
  13.         {% if displayType == 'color' or displayType == 'media' %}
  14.             {% set color = element.colorHexCode %}
  15.             {% set media = element.media.url %}
  16.             {% set name = element.translated.name %}
  17.             {% set id = element.id %}
  18.             {% block component_filter_property_select_preview %}
  19.                 <span class="filter-property-select-preview"
  20.                       title="{{ name }}"
  21.                       {% if displayType == 'color' and color %}
  22.                       style="background: {{ color }}"
  23.                       {% endif %}
  24.                       {% if displayType == 'media' and media %}
  25.                       style="background-image: url('{{ media }}')"
  26.                       {% endif %}>
  27.                     {% block component_filter_property_select_checkox_input %}
  28.                         <input type="checkbox"
  29.                                class="filter-property-select-checkbox filter-multi-select-checkbox"
  30.                                id="{{ id }}"
  31.                                data-label="{{ name }}"
  32.                                {% if displayType == 'color' and color %}
  33.                                data-preview-hex="{{ color }}"
  34.                                {% endif %}
  35.                                {% if displayType == 'media' and media %}
  36.                                data-preview-image-url="{{ media }}"
  37.                                {% endif %}>
  38.                     {% endblock %}
  39.                     {% block component_filter_property_select_preview_checkmark %}
  40.                         <span class="filter-property-select-preview-checkmark">
  41.                             {% block component_filter_property_select_preview_checkmark_icon %}
  42.                                 {% sw_icon 'checkmark' style {'pack': 'solid', 'size': 'xs'} %}
  43.                             {% endblock %}
  44.                         </span>
  45.                     {% endblock %}
  46.                 </span>
  47.             {% endblock %}
  48.             {% if not hideTitle %}
  49.                 {% block component_filter_property_select_preview_list_item_label_element %}
  50.                     <label class="filter-multi-select-item-label" for="{{ id }}">
  51.                         {% block component_filter_property_select_preview_list_item_label %}
  52.                             {{ name }}
  53.                         {% endblock %}
  54.                     </label>
  55.                 {% endblock %}
  56.             {% endif %}
  57.         {% else %}
  58.             {% block component_filter_property_select_preview_list_item %}
  59.                 {% sw_include '@Storefront/storefront/component/listing/filter/filter-multi-select-list-item.html.twig' %}
  60.             {% endblock %}
  61.         {% endif %}
  62.     </li>
  63. {% endblock %}