You are here

foundation-group-accordion.html.twig in ZURB Section 8.5

Displays a Zurb Foundation Section component.

Available variables:

  • $element array The element to render.
  • $items array An array of section items to render.

File

templates/foundation-group-accordion.html.twig
View source
  1. <?php
  2. /**
  3. * @file
  4. * Displays a Zurb Foundation Section component.
  5. *
  6. * Available variables:
  7. * - $element array The element to render.
  8. * - $items array An array of section items to render.
  9. *
  10. * @ingroup themeable
  11. */
  12. /** <?php print drupal_attributes($element['#attributes']) ?> */
  13. ?>
  14. <?php if (!empty($items)) : ?>
  15. <dl class="accordion" data-accordion>
  16. <?php foreach ($items as $item) : ?>
  17. <dd>
  18. <a href="#<?php print $item['container_attributes']['id']?>"><?php print $item['title']; ?></a>
  19. <div id="<?php print $item['container_attributes']['id']?>" <?php print drupal_attributes($item['content_attributes']) ?>>
  20. <?php print $item['content']; ?>
  21. </div>
  22. </dd>
  23. <?php endforeach; ?>
  24. </dl>
  25. <?php endif; ?>