You are here

imagefield-slideshow.html.twig in Imagefield Slideshow 8

Default theme implementation to display a formatted imagefield slideshow field.

Available variables:

  • image: A collection of image data.
  • image_style: An optional image style.
  • url: An optional URL the image can be linked to.

File

templates/imagefield-slideshow.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation to display a formatted imagefield slideshow field.
  5. *
  6. * Available variables:
  7. * - image: A collection of image data.
  8. * - image_style: An optional image style.
  9. * - url: An optional URL the image can be linked to.
  10. *
  11. * @see template_preprocess_image_formatter()
  12. *
  13. * @ingroup themeable
  14. */
  15. #}
  16. {% set prev = random() %}
  17. {% set next = random() %}
  18. <div class="imagefield_slideshow-wrapper">
  19. <div class="cycle-slideshow"
  20. data-cycle-pause-on-hover='{{ pause }}'
  21. data-cycle-fx="{{ effect }}"
  22. data-cycle-speed="{{ speed }}"
  23. data-cycle-timeout="{{ timeout }}"
  24. data-cycle-prev="#imagefield_slideshow-prev-{{ prev }}"
  25. data-cycle-next="#imagefield_slideshow-next-{{ next }}"
  26. data-cycle-loader="wait">
  27. {% if pager %}
  28. <div class="cycle-pager"></div>
  29. {% endif %}
  30. {% for key,value in url %}
  31. <img title="{{ value.title }}" alt="{{ value.alt }}" src="{{ value.uri }}" />
  32. {% endfor %}
  33. </div>
  34. {% if prev_next %}
  35. <div class="prev-next">
  36. <a href=# id="imagefield_slideshow-prev-{{ prev }}">Prev</a>
  37. <a href=# id="imagefield_slideshow-next-{{ next }}">Next</a>
  38. </div>
  39. {% endif %}
  40. </div>