You are here

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.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Theme for Bootstrap Quick Tabs accordion content.
  5. *
  6. * Available variables:
  7. * - id: the id attribute
  8. * - panels: array of panels to output
  9. *
  10. * @ingroup themeable
  11. */
  12. #}
  13. {% for panel_id, panel in panels %}
  14. <div class="panel panel-default">
  15. <div class="panel-heading" role="tab" {{ create_attribute({'id': 'heading' ~ panel_id })}}>
  16. <h4 class="panel-title">
  17. <a role="button" data-toggle="collapse" data-parent="#panel-group-{{ id }}" href="#{{ panel_id }}" aria-expanded="true" aria-controls="{{ panel_id }}">{{ panel.title }}</a>
  18. </h4>
  19. </div>
  20. <div {{ create_attribute({'id': panel_id, 'class': ['panel-collapse', 'collapse', panel.classes]}) }} role="tabpanel" aria-labelledby="{{ panel_id }}">
  21. <div class="panel-body">
  22. {{ panel.content }}
  23. </div>
  24. </div>
  25. </div>
  26. {% endfor %}