templates/areas/teaser-tour-row/Includes/tour-teaser-row.html.twig line 1

Open in your IDE?
  1. {% set breakindex = breakindex|default(2) %}
  2. <div class="{{ styleModifier | default(null) }} teaser-slider js-scrolling-row">
  3.     {# tour-teaser-row should only contain 4 teasers
  4.        teasers are displayed with scrollbar mobile
  5.     #}
  6.     <div class="{{ items|length < 4 ? 'justify-content-md-center' : '' }}  row scrolling-row scrolling-row--invisible-scrollbar  js-scrolling-row__row">
  7.         {% set break = false %}
  8.         {% for item in items %}
  9.             {%  if not break  %}
  10.                 <div class="col-md-3 col-5 scrolling-row__item  js-scrolling-row__item">
  11.                     {{ include('/Tour/teaser.html.twig', {tour: item}) }}
  12.                 </div>
  13.                 {% if loop.index > breakindex %}
  14.                     {% set break = true %}
  15.                 {% endif %}
  16.             {% endif %}
  17.         {% endfor %}
  18.         <div class="col-md-3 col-10 scrolling-row__item  js-scrolling-row__item">
  19.             {% if editmode %}
  20.                 <div class="editmode-box editmode-box--info mb-5 text-left">
  21.                     <div class="editmode-box__header">Text Teaser Settings</div>
  22.                     <div>
  23.                         <strong>Text: </strong>
  24.                         {{ pimcore_input('teaser_row-snippet-text') }}
  25.                         <label>Link </label>
  26.                         {{ pimcore_link('teaser_row-snippet-link') }}
  27.                     </div>
  28.                 </div>
  29.             {% else %}
  30.                 {{ include('Includes/Teaser/simple-text-snippet.html.twig', {
  31.                     "text": pimcore_input('teaser_row-snippet-text').data,
  32.                     "button": {
  33.                         href:  pimcore_link('teaser_row-snippet-link').href,
  34.                         text: pimcore_link('teaser_row-snippet-link').text,
  35.                     },
  36.                     "color": "default"
  37.                 }) }}
  38.             {% endif %}
  39.         </div>
  40.     </div>
  41.     {% if items|length > 4 %}
  42.         <div class="scrolling-row-navigation">
  43.             <button class="teaser-slider__btn scrolling-row__button scrolling-row__button--prev js-scrolling-row__prev scrolling-row__button--disabled"><span class="icon icon-arrow-right" aria-label="Previous"></span></button>
  44.             <button class="teaser-slider__btn scrolling-row__button scrolling-row__button--next js-scrolling-row__next"><span class="icon icon-arrow-right" aria-label="Next"></span></button>
  45.         </div>
  46.     {% endif %}
  47. </div>