custom/plugins/SasBlogModule/src/Resources/views/storefront/element/cms-element-blog.html.twig line 1

Open in your IDE?
  1. {% block sas_element_blog_listing %}
  2.     {# @var result \Shopware\Core\Framework\DataAbstractionLayer\Search\EntitySearchResult #}
  3.     {% set searchResult = element.data %}
  4.     {% set config = element.fieldConfig.elements %}
  5.     {% set slot = page.cmsPage.firstElementOfType('blog') %}
  6.     {% set filterUrl = null %}
  7.     {% set dataUrl = null %}
  8.     {% if page.header.navigation.active.id %}
  9.         {% set filterUrl = url('frontend.cms.navigation.filter', { navigationId: page.header.navigation.active.id }) %}
  10.         {% set dataUrl = url('frontend.cms.navigation.page', { navigationId: page.header.navigation.active.id }) %}
  11.     {% endif %}
  12.     {% set params = { slots: slot.id, 'no-aggregations': 1 } %}
  13.     {% block sas_element_blog_listing_wrapper %}
  14.         {% block sas_block_filter_panel %}
  15.             {% if config.showCategoryFilter.value or config.showAuthorFilter.value %}
  16.                 <div id="filter-panel-wrapper"
  17.                      class="filter-panel-wrapper"
  18.                      data-offcanvas-filter-content="true">
  19.                     {% sw_include '@Storefront/storefront/component/listing/blog-filter-panel.html.twig' with {
  20.                         listing: searchResult,
  21.                         sidebar: false
  22.                     } %}
  23.                 </div>
  24.             {% endif %}
  25.         {% endblock %}
  26.         {% sw_include '@Storefront/storefront/component/blog/listing.html.twig' with {
  27.             searchResult: searchResult,
  28.             dataUrl: dataUrl,
  29.             filterUrl: filterUrl,
  30.             params: params,
  31.             config: config
  32.         } %}
  33.     {% endblock %}
  34. {% endblock %}