You are here

slick-wrapper.html.twig in Slick Carousel 8

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

Default theme implementation for a slick wrapper.

Available variables:

  • items: A list of items containing main and thumbnail of slick.html.twig which can be re-position using option Thumbnail position.
  • attributes: HTML attributes to be applied to the list.
  • settings: An array containing the given settings.

File

templates/slick-wrapper.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation for a slick wrapper.
  5. *
  6. * Available variables:
  7. * - items: A list of items containing main and thumbnail of slick.html.twig
  8. * which can be re-position using option Thumbnail position.
  9. * - attributes: HTML attributes to be applied to the list.
  10. * - settings: An array containing the given settings.
  11. *
  12. * @ingroup themeable
  13. */
  14. #}
  15. {%
  16. set classes = [
  17. 'slick-wrapper',
  18. settings.nav ? 'slick-wrapper--asnavfor',
  19. settings.skin ? 'slick-wrapper--' ~ settings.skin|clean_class,
  20. settings.skin_thumbnail ? 'slick-wrapper--' ~ settings.skin_thumbnail|clean_class,
  21. settings.vertical ? 'slick-wrapper--v',
  22. settings.vertical_tn ? 'slick-wrapper--v-tn',
  23. settings.thumbnail_position ? 'slick-wrapper--tn-' ~ settings.thumbnail_position|clean_class,
  24. 'over' in settings.thumbnail_position ? 'slick-wrapper--tn-overlay',
  25. 'over' in settings.thumbnail_position ? 'slick-wrapper--tn-' ~ settings.thumbnail_position|replace({ 'over-' : '' })
  26. ]
  27. %}
  28. {% set content %}
  29. {% for item in items %}
  30. {{ item }}
  31. {% endfor %}
  32. {% endset %}
  33. {% spaceless %}
  34. {% if settings.nav %}
  35. <div{{ attributes.addClass(classes)|without('id') }}>
  36. {{ content }}
  37. </div>
  38. {% else %}
  39. {{ content }}
  40. {% endif %}
  41. {% endspaceless %}