You are here

jcarousel.html.twig in jCarousel 8.4

Same filename and directory in other branches
  1. 8.5 templates/jcarousel.html.twig

View template to display a list as a carousel.

Available variables

  • attributes: A list of HTML attributes for the wrapper element.
  • items: The rendered rows.

File

templates/jcarousel.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * View template to display a list as a carousel.
  5. *
  6. * Available variables
  7. * - attributes: A list of HTML attributes for the wrapper element.
  8. * - items: The rendered rows.
  9. *
  10. * @see template_preprocess_jcarousel_view()
  11. *
  12. * @ingroup themeable
  13. */
  14. #}
  15. <div{{ attributes_wrapper }}>
  16. {% if options.navigation == 'before' %}
  17. <a{{ attributes_previous }} href="#"></a>
  18. <a{{ attributes_next }} href="#"></a>
  19. {% endif %}
  20. <div{{ attributes }}>
  21. <ul{{ attributes_content }}>
  22. {% for key,row in items %}
  23. <li{{ attributes_row[key] }}>
  24. {{ row }}
  25. </li>
  26. {% endfor %}
  27. </ul>
  28. </div>
  29. {% if options.navigation == 'after' %}
  30. <a{{ attributes_previous }} href="#"></a>
  31. <a{{ attributes_next }} href="#"></a>
  32. {% endif %}
  33. </div>