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

Open in your IDE?
  1. {% set listingColumns = 'col-sm-6 col-lg-4 col-xl-3' %}
  2. {% set products = element.data.elements %}
  3. <div class="cms-element-product-listing">
  4.     <div class="row cms-listing-row js-listing-wrapper">
  5.         {% if products|length > 0 %}
  6.             {% block element_product_listing_col %}
  7.                 {% for product in products %}
  8.                     <div class="cms-listing-col {{ listingColumns }}">
  9.                         {% block element_product_listing_box %}
  10.                             {% sw_include '@Storefront/storefront/component/product/card/box.html.twig' with {
  11.                                 'layout': lement.config.boxLayout.value,
  12.                                 'displayMode': element.config.displayMode.value
  13.                             } %}
  14.                         {% endblock %}
  15.                     </div>
  16.                 {% endfor %}
  17.             {% endblock %}
  18.         {% else %}
  19.             {% block element_product_listing_col_empty %}
  20.                 <div class="cms-listing-col col-12">
  21.                     {% block element_product_listing_col_empty_alert %}
  22.                         {% sw_include '@Storefront/storefront/utilities/alert.html.twig' with {
  23.                             type: 'info',
  24.                             content: 'listing.emptyResultMessage'|trans|sw_sanitize
  25.                         } %}
  26.                     {% endblock %}
  27.                 </div>
  28.             {% endblock %}
  29.         {% endif %}
  30.     </div>
  31. </div>