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

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