You are here

slick-vanilla.html.twig in Slick Carousel 8.2

Same filename and directory in other branches
  1. 8 templates/slick-vanilla.html.twig

Default theme implementation for the slick-vanilla item template.

This is a vanilla alternative for slick-slide.html.twig where everything is dumped as is into 'item'. Think of it as a raw individual item output. Choosing vanilla means you are on your own, and want a more controlled item.

Available variables:

  • attributes: An array of attributes to apply to the element.
  • item: A renderable array of the slide content.
  • settings: An array containing the given settings.

File

templates/slick-vanilla.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation for the slick-vanilla item template.
  5. *
  6. * This is a vanilla alternative for slick-slide.html.twig where everything is
  7. * dumped as is into 'item'. Think of it as a raw individual item output.
  8. * Choosing vanilla means you are on your own, and want a more controlled item.
  9. *
  10. * Available variables:
  11. * - attributes: An array of attributes to apply to the element.
  12. * - item: A renderable array of the slide content.
  13. * - settings: An array containing the given settings.
  14. *
  15. * @see template_preprocess_slick_vanilla()
  16. */
  17. #}
  18. {%
  19. set classes = [
  20. 'slick__slide',
  21. 'slide',
  22. 'slide--' ~ delta
  23. ]
  24. %}
  25. {% block slick_vanilla %}
  26. <div{{ attributes.addClass(classes) }}>
  27. {{ item }}
  28. </div>
  29. {% endblock %}