custom/plugins/KayloBasicTheme/src/Resources/views/storefront/element/cms-element-product-listing.html.twig line 1

Open in your IDE?
  1. {% block element_product_listing %}
  2.     {# @var result \Shopware\Core\Framework\DataAbstractionLayer\Search\EntitySearchResult #}
  3.     {% set searchResult = element.data.listing %}
  4.     {% set listingColumns = 'col-sm-6 col-lg-4 col-xl-3' %}
  5.     {% if section and section.type == 'sidebar' %}
  6.         {% set listingColumns = 'col-sm-6 col-lg-6 col-xl-4' %}
  7.     {% endif %}
  8.     {% set slot = cmsPage.firstElementOfType('product-listing') %}
  9.     {% set filterUrl = null %}
  10.     {% set dataUrl = null %}
  11.     {% if searchResult.currentFilters.navigationId %}
  12.         {% set filterUrl = url('frontend.cms.navigation.filter', { navigationId: searchResult.currentFilters.navigationId }) %}
  13.         {% set dataUrl = url('frontend.cms.navigation.page', { navigationId: searchResult.currentFilters.navigationId }) %}
  14.     {% endif %}
  15.     {% set sidebar = sectionType == 'sidebar' %}
  16.     {% set params = { slots: slot.id, 'no-aggregations': 1 } %}
  17.     {% block element_product_listing_wrapper %}
  18.         {% sw_include '@Storefront/storefront/component/product/listing.html.twig' with {
  19.             searchResult: searchResult,
  20.             dataUrl: dataUrl,
  21.             filterUrl: filterUrl,
  22.             params: params,
  23.             sidebar: sidebar,
  24.             boxLayout: element.translated.config.boxLayout.value,
  25.             displayMode: element.translated.config.displayMode.value,
  26.             listingColumns: listingColumns
  27.         } %}
  28.     {% endblock %}
  29. {% endblock %}