templates/frontend-eforum/_partials/modules/recommendedProducts.html.twig line 1

Open in your IDE?
  1. {% if recommendedProducts is not empty %}
  2.     <section class="product-list">
  3.         <div class="container">
  4.             {% if module.title is defined %}
  5.                 <header class="product-list__header">
  6.                     <h2 class="product-list__heading">{{ module.title }}</h2>
  7.                 </header>
  8.             {% endif %}
  9.             {% set sideProducts = [] %}
  10.             <div class="row">
  11.                 <div class="product-list__slider product-list__slider-recommended" data-sliderRecommended>
  12.                     {% if module.extraProducts is defined and module.extraProducts is not empty %}
  13.                         {% set recommendedProducts = module.extraProducts|merge(recommendedProducts) %}
  14.                     {% endif %}
  15.                     {% for product in recommendedProducts %}
  16.                         {% if loop.index > 4 and loop.index < 7 %}
  17.                             {% set sideProducts = sideProducts|merge([product]) %}
  18.                         {% else %}
  19.                             {% include "frontend-eforum/_partials/product-box.html.twig" with {product: product, 'kcShortDesc': true} %}
  20.                         {% endif %}
  21.                     {% endfor %}
  22.                 </div>
  23.                 {% if module.bannerBoxBackground is defined and module.bannerBoxBackground is not empty %}
  24.                     <article class="banner-box col-xs-12 col-sm-12 col-md-12 col-lg-6">
  25.                         <div class="banner-box__inner"
  26.                              style="background-image: url(/uploads/productCmsFiles/{{ module.bannerBoxBackground }})"
  27.                         >
  28.                             {% if module.bannerBoxTitle is defined %}
  29.                                 <h2 class="banner-box__title">{{ module.bannerBoxTitle }}</h2>
  30.                             {% endif %}
  31.                             {% if module.bannerBoxDescription is defined %}
  32.                                 <p class="banner-box__description">{{ module.bannerBoxDescription }}</p>
  33.                             {% endif %}
  34.                             {% if module.link is defined and module.link is not empty %}
  35.                                 <a class="button button--white button--with-arrow"
  36.                                    href="{{ module.link }}"
  37.                                 >
  38.                                     {% if module.bannerBoxButtonText is defined %}
  39.                                         {{ module.bannerBoxButtonText }}
  40.                                     {% else %}
  41.                                         Poznaj ofertÄ™
  42.                                     {% endif %}
  43.                                 </a>
  44.                             {% endif %}
  45.                         </div>
  46.                     </article>
  47.                 {% endif %}
  48.                 {% for sideProduct in sideProducts %}
  49.                     {% include "frontend-eforum/_partials/product-box.html.twig" with {product: sideProduct, class: 'col-xs-12 col-sm-6 col-md-6 col-lg-3', 'kcShortDesc': true} %}
  50.                 {% endfor %}
  51.             </div>
  52.         </div>
  53.     </section>
  54. {% endif %}