field-orbit.html.twig in ZURB Orbit 8
Template file for field_slideshow
2 theme calls to field-orbit.html.twig
- OrbitFormatter::viewElements in src/
Plugin/ Field/ FieldFormatter/ OrbitFormatter.php - Builds a renderable array for a field value.
- OrbitMediaFormatter::viewElements in src/
Plugin/ Field/ FieldFormatter/ OrbitMediaFormatter.php - Builds a renderable array for a field value.
File
templates/field-orbit.html.twigView source
- {#
- /**
- * @file
- * Template file for field_slideshow
- */
- #}
- <div class="orbit field-orbit-{{ orbit_id }} field-orbit-wrapper" role="region" data-orbit data-options="{{ data_options }}">
- <ul class="orbit-container">
- {% if (options.navButtons is not defined) or (options.navButtons == 1) %}
- <button class="orbit-previous"><span class="show-for-sr">{{ 'Previous Slide'|t }}</span>◀︎</button>
- <button class="orbit-next"><span class="show-for-sr">{{ 'Next Slide'|t }}</span>▶︎</button>
- {% endif %}
- {% for num,item in items %}
- {% set itemVal = item.getValue() %}
- <li class="orbit-slide">
- {{ image[num] }}
- {% if itemVal['caption'] is defined and itemVal['caption'] != '' %}
- <figcaption class="orbit-caption">
- {% if itemVal['caption_path'] != '' %}
- {{ link(itemVal['caption'], itemVal['caption_path']) }}
- {% else %}
- {{ itemVal['caption'] }}
- {% endif %}
- </figcaption>
- {% endif %}
- </li>
- {% endfor %}
- </ul>
- {% if (options.bullets is not defined) or (options.bullets == 1) %}
- <nav class="orbit-bullets">
- {% for key, item in items %}
- <button data-slide="{{ key }}"></button>
- {% endfor %}
- </nav>
- {% endif %}
- </div>