You are here

field-orbit.html.twig in ZURB Orbit 8

Template file for field_slideshow

File

templates/field-orbit.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Template file for field_slideshow
  5. */
  6. #}
  7. <div class="orbit field-orbit-{{ orbit_id }} field-orbit-wrapper" role="region" data-orbit data-options="{{ data_options }}">
  8. <ul class="orbit-container">
  9. {% if (options.navButtons is not defined) or (options.navButtons == 1) %}
  10. <button class="orbit-previous"><span class="show-for-sr">{{ 'Previous Slide'|t }}</span>&#9664;&#xFE0E;</button>
  11. <button class="orbit-next"><span class="show-for-sr">{{ 'Next Slide'|t }}</span>&#9654;&#xFE0E;</button>
  12. {% endif %}
  13. {% for num,item in items %}
  14. {% set itemVal = item.getValue() %}
  15. <li class="orbit-slide">
  16. {{ image[num] }}
  17. {% if itemVal['caption'] is defined and itemVal['caption'] != '' %}
  18. <figcaption class="orbit-caption">
  19. {% if itemVal['caption_path'] != '' %}
  20. {{ link(itemVal['caption'], itemVal['caption_path']) }}
  21. {% else %}
  22. {{ itemVal['caption'] }}
  23. {% endif %}
  24. </figcaption>
  25. {% endif %}
  26. </li>
  27. {% endfor %}
  28. </ul>
  29. {% if (options.bullets is not defined) or (options.bullets == 1) %}
  30. <nav class="orbit-bullets">
  31. {% for key, item in items %}
  32. <button data-slide="{{ key }}"></button>
  33. {% endfor %}
  34. </nav>
  35. {% endif %}
  36. </div>