You are here

slick-thumbnail.html.twig in Slick Carousel 8

Same filename and directory in other branches
  1. 8.2 templates/slick-thumbnail.html.twig

Default theme implementation for the slick-thumbnail item template.

Available variables:

  • attributes: An array of attributes to apply to the element.
  • item.slide: A renderable array of the thumbnail image/background.
  • item.caption: A renderable array containing caption text.
  • settings: An array containing the given settings.

File

templates/slick-thumbnail.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation for the slick-thumbnail item template.
  5. *
  6. * Available variables:
  7. * - attributes: An array of attributes to apply to the element.
  8. * - item.slide: A renderable array of the thumbnail image/background.
  9. * - item.caption: A renderable array containing caption text.
  10. * - settings: An array containing the given settings.
  11. *
  12. * @see template_preprocess_slick_thumbnail()
  13. */
  14. #}
  15. {%
  16. set classes = [
  17. 'slick__slide',
  18. 'slide',
  19. 'slide--' ~ delta
  20. ]
  21. %}
  22. {% block slick_thumbnail %}
  23. <div{{ attributes.addClass(classes) }}>
  24. {{ item.slide }}
  25. {% if item.caption is not empty %}
  26. <div class="slide__caption">{{ item.caption }}</div>
  27. {% endif %}
  28. </div>
  29. {% endblock %}