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

Open in your IDE?
  1. {% block element_blog_listing %}
  2.     {% set blogPosts = element.data.posts %}
  3.     {% set blogCategoryId = element.data.categoryId %}
  4.     {% set listingColumns = 'col-sm-6 col-lg-4 col-xl-3' %}
  5.     {% if element.translated.config.boxLayout.value == 'image' %}
  6.         {% set listingColumns = 'col-sm-6 col-lg-4 col-xl-4' %}
  7.     {% endif %}
  8.     {% if section and section.type == 'sidebar' %}
  9.         {% set listingColumns = 'col-sm-6 col-lg-6 col-xl-4' %}
  10.         {% if element.translated.config.boxLayout.value == 'image' %}
  11.             {% set listingColumns = 'col-sm-6 col-lg-6 col-xl-6' %}
  12.         {% endif %}
  13.     {% endif %}
  14.     {% set slot = page.cmsPage.firstElementOfType('blog-listing') %}
  15.     {% set filterUrl = null %}
  16.     {% set dataUrl = null %}
  17.     {% if blogCategoryId %}
  18.         {% set filterUrl = url('frontend.cms.navigation.filter', { navigationId: blogCategoryId}) %}
  19.         {% set dataUrl = url('frontend.cms.navigation.page', { navigationId: blogCategoryId }) %}
  20.     {% endif %}
  21.     {% set sidebar = sectionType == 'sidebar' %}
  22.     {% set params = { slots: slot.id, 'no-aggregations': 1 } %}
  23.     {% block element_blog_listing_wrapper %}
  24.         {% sw_include '@Storefront/storefront/component/blog/listing.html.twig' with {
  25.             blogPosts: blogPosts,
  26.             blogCategoryId: blogCategoryId,
  27.             dataUrl: dataUrl,
  28.             filterUrl: filterUrl,
  29.             params: params,
  30.             sidebar: sidebar,
  31.             boxLayout: element.translated.config.boxLayout.value,
  32.             listingColumns: listingColumns
  33.         } %}
  34.     {% endblock %}
  35. {% endblock %}