templates/default/components/organisms/teaser-boxes/teaser-boxes.html.twig line 1

Open in your IDE?
  1. {% set teaserStyling = ' teaser--' ~ (teaserBoxes|length > 2 ? 'top' : 'left') %}
  2. {% set columnsModifier = ' teaser-boxes__item-' ~ teaserBoxes|length %}
  3. {% if teaserImageOrientation is defined and teaserImageOrientation is not empty %}
  4. {% set teaserStyling = ' teaser--' ~ teaserImageOrientation %}
  5. {% endif %}
  6. {% if background is defined and background is not empty %}
  7. {% set teaserBackground = ' teaser--' ~ background %}
  8. {% endif %}
  9. {% if columnCount is defined and columnCount > 0 %}
  10. {% set columnsModifier = ' teaser-boxes__item-' ~ columnCount %}
  11. {% endif %}
  12. <div class="teaser-boxes">
  13. {% for teaser in teaserBoxes %}
  14. {# molecules/teaser #}
  15. {{ render_storyblok(teaser, {
  16. 'class': 'teaser-boxes__item' ~ columnsModifier ~ teaserStyling ~ teaserBackground|default
  17. }) }}
  18. {% endfor %}
  19. </div>