flickity-entity-view.html.twig in Flickity Carousel 8
Same filename and directory in other branches
flickity-entity-view.html.twig Default theme implementation to present content in a flickity slideshow.
Available variables:
- contents: A list of content items. Use 'contents' to print all content.
- attributes: HTML attributes for the container element.
- title_attributes: HTML attributes for the title.
- label_hidden: Whether to show the field label or not.
- label_display: The display settings for the label.
- label: The label for the field.
See also
1 theme call to flickity-entity-view.html.twig
- FlickityEntityView::viewElements in modules/
fields/ src/ Plugin/ Field/ FieldFormatter/ FlickityEntityView.php - Builds a renderable array for a field value.
File
modules/fields/templates/flickity-entity-view.html.twigView source
- {#
- /**
- * @file flickity-entity-view.html.twig
- * Default theme implementation to present content in a flickity slideshow.
- *
- * Available variables:
- * - contents: A list of content items. Use 'contents' to print all content.
- * - attributes: HTML attributes for the container element.
- * - title_attributes: HTML attributes for the title.
- * - label_hidden: Whether to show the field label or not.
- * - label_display: The display settings for the label.
- * - label: The label for the field.
- *
- * @see template_preprocess_flickity_entity_view()
- */
- #}
- {%
- set classes = [
- 'carousel',
- 'field--label-' ~ label_display,
- ]
- %}
- {%
- set title_classes = [
- 'field__label',
- label_display == 'visually_hidden' ? 'visually-hidden',
- ]
- %}
-
- {% if contents %}
- <div{{ attributes.addClass(classes) }}>
- {% if not label_hidden %}
- <div{{ title_attributes.addClass(title_classes) }}>{{ label }}</div>
- {% endif %}
- {% for content in contents %}
- <div class="gallery-cell">
- {{- content -}}
- </div>
- {% endfor %}
- </div>
- {% endif %}