You are here

foundation-accordion.tpl.php in ZURB Section 7.3

Same filename and directory in other branches
  1. 7 templates/foundation-accordion.tpl.php

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-accordion.tpl.php
View source
<?php

/**
 * @file
 * Displays a Zurb Foundation Section component.
 *
 * Available variables:
 * - $element array The element to render.
 * - $items array An array of section items to render.
 *
 * @ingroup themeable
 */

/** <?php print drupal_attributes($element['#attributes']) ?> */
?>

<?php

if (!empty($items)) {
  ?>
  <dl class="accordion" data-accordion>
    <?php

  foreach ($items as $item) {
    ?>
      <dd>
        <a href="#<?php

    print $item['container_attributes']['id'];
    ?>"><?php

    print $item['title'];
    ?></a>
        <div id="<?php

    print $item['container_attributes']['id'];
    ?>" <?php

    print drupal_attributes($item['content_attributes']);
    ?>>
          <?php

    print $item['content'];
    ?>
        </div>
      </dd>
    <?php

  }
  ?>
  </dl>
<?php

}