uikit-view-accordion.html.twig in UIkit Components 8.3
Same filename and directory in other branches
Theme override for a view template to display an accordion of rows.
Available variables:
- accordion_attributes: HTML attributes for the container.
- items: A list of rows for this accordion.
- title: The row's title.
- content: The row's contents.
- title: The title of this group of rows. May be empty.
See also
File
uikit_views/templates/views/uikit-view-accordion.html.twigView source
- {#
- /**
- * @file
- * Theme override for a view template to display an accordion of rows.
- *
- * Available variables:
- * - accordion_attributes: HTML attributes for the container.
- * - items: A list of rows for this accordion.
- * - title: The row's title.
- * - content: The row's contents.
- * - title: The title of this group of rows. May be empty.
- *
- * @see template_preprocess_uikit_view_accordion()
- */
- #}
- {% if title %}
- <h3>{{ title }}</h3>
- {% endif %}
-
- <ul{{ accordion_attributes }}>
- {% for row in items %}
- <li>
- <h3 class="uk-accordion-title">{{ row.title }}</h3>
- <div class="uk-accordion-content">{{ row.content }}</div>
- </li>
- {% endfor %}
- </ul>