/ Published in: PHP
out put a field with multiple values as a list fro styling purposes useing child selectors
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<div class="<?php print $classes; ?>"<?php print $attributes; ?>> <?php if (!$label_hidden): ?> <div class="field-label"<?php print $title_attributes; ?>><?php print $label ?>: </div> <?php endif; ?> <ul class="field-items"<?php print $content_attributes; ?>> <?php foreach ($items as $delta => $item): ?> <li><?php print render($item); ?></li> <?php endforeach; ?> </div> </ul>