templates/bundles/SyliusShopBundle/Homepage/sections/slider.html.twig line 1

Open in your IDE?
  1. {% set twig_img_path = absolute_url('/media/image/') %}
  2. <div class="page-wrapper fluid-wrapper h-auto">
  3.     <div class="carousel slide h-100" data-ride="carousel" id="landing_slider">
  4.         <!-- Indicators -->
  5.         <ul class="carousel-indicators round-carousel-indicators">
  6.             {% if pageContents['landing_slider']|default(null) %}
  7.                 {% for key, section in pageContents['landing_slider'] %}
  8.                     {% set active = (key + 1) == 1 %}
  9.                     <li {% if active %}class="active"{% endif %} data-slide-to="{{ key }}" data-target="#landing_slider"></li>
  10.                 {% endfor %}
  11.             {% endif %}
  12.         </ul>
  13.         <!-- The slideshow -->
  14.         <div class="carousel-inner h-100 align-middle">
  15.             {% if pageContents['landing_slider']|default(null) %}
  16.                 {% for key, section in pageContents['landing_slider'] %}
  17.                     {% set active = (key + 1) == 1 %}
  18.                     {% set imageSource = twig_img_path ~ section.sectionImage.path %}
  19.                     {% include '@App/bundles/SyliusShopBundle/Homepage/sections/slider_card.html.twig' with {
  20.                         'imageSource': imageSource,
  21.                         'content': section.content,
  22.                         'link': section.slug,
  23.                         'buttonText': 'bundles.sylius_shop.homepage.index.landing_sections.slider.see_more',
  24.                         'isActive': active,
  25.                     } %}
  26.                 {% endfor %}
  27.             {% endif %}
  28.         </div>
  29.         <div class="slider-border-bottom">
  30.             {% include '@App/bundles/SyliusShopBundle/Homepage/sections/slider_border_bottom.html.twig' %}
  31.         </div>
  32.     </div>
  33. </div>