4 * Default theme implementation for displaying a view as a bootstrap carousel.
7 * - view: The view object.
8 * - rows: A list of the view's row items.
9 * - id: A valid HTML ID and guaranteed to be unique.
10 * - interval: The amount of time to delay between automatically cycling a
11 * slide item. If false, carousel will not automatically cycle.
12 * - pause: Pauses the cycling of the carousel on mouseenter and
13 * resumes the cycling of the carousel on mouseleave.
14 * - wrap: Whether the carousel should cycle continuously or have
17 * @see template_preprocess_views_bootstrap_carousel()
22 <div id="{{ id }}" class="carousel slide" data-ride="carousel" data-interval="{{ interval }}" data-pause="{{ pause }}" data-wrap="{{ wrap }}">
24 {# Carousel indicators #}
26 <ol class="carousel-indicators">
27 {% for key, row in rows %}
28 {% set indicator_classes = [loop.first ? 'active'] %}
29 <li class="{{ indicator_classes|join(' ') }}" data-target="#{{ id }}" data-slide-to="{{ key }}"></li>
35 <div class="carousel-inner" role="listbox">
37 {% set row_classes = ['item', loop.first ? 'active'] %}
38 <div class="{{ row_classes|join(' ') }}">
40 {% if row.title or row.description %}
41 <div class="carousel-caption">
43 <h3>{{ row.title }}</h3>
45 {% if row.description %}
46 <p>{{ row.description }}</p>
54 {# Carousel navigation #}
56 <a class="left carousel-control" href="#{{ id }}" role="button" data-slide="prev">
57 <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
58 <span class="sr-only">{{ 'Previous'|t }}</span>
60 <a class="right carousel-control" href="#{{ id }}" role="button" data-slide="next">
61 <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
62 <span class="sr-only">{{ 'Next'|t }}</span>