You are here

field--fences-ol.tpl.php in Fences 7

Same filename and directory in other branches
  1. 7.2 templates/field--fences-ol.tpl.php

field--fences-ol.tpl.php Wrap each field value in the <li> element and all of them in the <ol> element.

File

templates/field--fences-ol.tpl.php
View source
<?php

/**
 * @file field--fences-ol.tpl.php
 * Wrap each field value in the <li> element and all of them in the <ol> element.
 *
 * @see http://developers.whatwg.org/grouping-content.html#the-ol-element
 */
if ($element['#label_display'] == 'inline') {
  ?>
  <span class="field-label"<?php

  print $title_attributes;
  ?>>
    <?php

  print $label;
  ?>:
  </span>
<?php

}
elseif ($element['#label_display'] == 'above') {
  ?>
  <h3 class="field-label"<?php

  print $title_attributes;
  ?>>
    <?php

  print $label;
  ?>
  </h3>
<?php

}
?>

<ol class="<?php

print $classes;
?>"<?php

print $attributes;
?>>

  <?php

foreach ($items as $delta => $item) {
  ?>
    <li<?php

  print $item_attributes[$delta];
  ?>>
      <?php

  print render($item);
  ?>
    </li>
  <?php

}
?>

</ol>