Posted By

mktimes5 on 11/27/12



Versions (?)

Drupal & field-tpl for mulitple field rendering in a list

 / Published in: PHP

out put a field with multiple values as a list fro styling purposes useing child selectors

  1. <div class="<?php print $classes; ?>"<?php print $attributes; ?>>
  2. <?php if (!$label_hidden): ?>
  3. <div class="field-label"<?php print $title_attributes; ?>><?php print $label ?>:&nbsp;</div>
  4. <?php endif; ?>
  5. <ul class="field-items"<?php print $content_attributes; ?>>
  6. <?php foreach ($items as $delta => $item): ?>
  7. <li><?php print render($item); ?></li>
  8. <?php endforeach; ?>
  9. </div>
  10. </ul>

Report this snippet  

You need to login to post a comment.