vendor/store.shopware.com/h1webblog/src/Resources/views/storefront/component/h1webblog/listing.html.twig line 1

Open in your IDE?
  1. {% set currentPage = ((searchResult.criteria.offset + 1) / searchResult.criteria.limit )|round(0, 'ceil') %}
  2. {% set paginationConfig = { page: currentPage }|json_encode %}
  3. {% set listingPagination = {
  4.     sidebar: sidebar,
  5.     params: params,
  6.     dataUrl: dataUrl,
  7.     filterUrl: filterUrl,
  8.     snippets: {
  9.         resetAllButtonText: 'listing.filterPanelResetAll'|trans|sw_sanitize
  10.     }
  11. } %}
  12. {% block h1webblog_listing %}
  13.     <div class="cms-element-product-listing-wrapper"
  14.          data-listing-pagination="true"
  15.          data-listing-pagination-options='{{ paginationConfig }}'
  16.          data-listing="true"
  17.          data-listing-options='{{ listingPagination|json_encode }}'>
  18.         {% block element_h1webblog_listing_wrapper_content %}
  19.             <div {% if page.cmsPage.type != 'product_list' %}class="cms-element-product-listing"{% endif %}>
  20.                 {% block element_h1webblog_listing_row %}
  21.                     <div class="row cms-listing-row js-listing-wrapper{% if (justifyContent) %} {{ justifyContent }}{% endif %}">
  22.                         {% if searchResult.total > 0 %}
  23.                             {% block element_h1webblog_listing_col %}
  24.                                 {% for blog in searchResult %}
  25.                                     <div class="cms-listing-col {{ listingColumns }} mb-5">
  26.                                         {% block element_h1webblog_listing_box %}
  27.                                             {% sw_include '@Storefront/storefront/component/h1webblog/card/box.html.twig' %}
  28.                                         {% endblock %}
  29.                                     </div>
  30.                                 {% endfor %}
  31.                             {% endblock %}
  32.                         {% else %}
  33.                             {% block element_h1webblog_listing_col_empty %}
  34.                                 <div class="cms-listing-col col-12">
  35.                                     {% block element_h1webblog_listing_col_empty_alert %}
  36.                                         {% sw_include '@Storefront/storefront/utilities/alert.html.twig' with {
  37.                                             type: 'info',
  38.                                             content: 'listing.emptyResultMessage'|trans|sw_sanitize
  39.                                         } %}
  40.                                     {% endblock %}
  41.                                 </div>
  42.                             {% endblock %}
  43.                         {% endif %}
  44.                     </div>
  45.                 {% endblock %}
  46.                 {% if searchResult.total > searchResult.limit %}
  47.                     {% block element_h1webblog_listing_pagination_nav_bottom %}
  48.                         {% sw_include '@Storefront/storefront/component/pagination.html.twig' with {
  49.                             entities: searchResult,
  50.                             criteria: searchResult.criteria
  51.                         } %}
  52.                     {% endblock %}
  53.                 {% endif %}
  54.             </div>
  55.         {% endblock %}
  56.     </div>
  57. {% endblock %}