bootstrap-accordion.html.twig in Bootstrap Quick Tabs 8
Theme for Bootstrap Quick Tabs accordion content.
Available variables:
- id: the id attribute
- panels: array of panels to output
File
templates/bootstrap-accordion.html.twigView source
- {#
- /**
- * @file
- * Theme for Bootstrap Quick Tabs accordion content.
- *
- * Available variables:
- * - id: the id attribute
- * - panels: array of panels to output
- *
- * @ingroup themeable
- */
- #}
-
- {% for panel_id, panel in panels %}
-
- <div class="panel panel-default">
- <div class="panel-heading" role="tab" {{ create_attribute({'id': 'heading' ~ panel_id })}}>
- <h4 class="panel-title">
- <a role="button" data-toggle="collapse" data-parent="#panel-group-{{ id }}" href="#{{ panel_id }}" aria-expanded="true" aria-controls="{{ panel_id }}">{{ panel.title }}</a>
- </h4>
- </div>
- <div {{ create_attribute({'id': panel_id, 'class': ['panel-collapse', 'collapse', panel.classes]}) }} role="tabpanel" aria-labelledby="{{ panel_id }}">
- <div class="panel-body">
- {{ panel.content }}
- </div>
- </div>
- </div>
-
- {% endfor %}