summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYves Chedemois2008-08-27 15:10:35 (GMT)
committer Yves Chedemois2008-08-27 15:10:35 (GMT)
commitceee3df90c868ddf909212d6617b193eaa853647 (patch)
tree068634f48cd25a20b33d7bfd59873bdfae35b4f0
parent726ff4eb546ed198a08d5c9182be44ace5ba9b28 (diff)
#266205 followup (didn't get included in previous commit)
-rw-r--r--theme/field.tpl.php24
1 files changed, 13 insertions, 11 deletions
diff --git a/theme/field.tpl.php b/theme/field.tpl.php
index 8121bf2..4763061 100644
--- a/theme/field.tpl.php
+++ b/theme/field.tpl.php
@@ -4,17 +4,19 @@
<div class="field-label"><?php print $label ?>:&nbsp;</div>
<?php endif;?>
<div class="field-items">
- <?php foreach ($items as $delta => $item) :
- if (!empty($item['view']) || $item['view'] === "0") : ?>
- <div class="field-item">
- <?php if ($label_display == 'inline') { ?>
- <div class="field-label-inline<?php print($delta ? '' : '-first')?>">
- <?php print $label ?>:&nbsp;</div>
- <?php } ?>
- <?php print $item['view'] ?>
- </div>
- <?php endif;
- endforeach;?>
+ <?php $count = 1;
+ foreach ($items as $delta => $item) :
+ if (!empty($item['view']) || $item['view'] === "0") : ?>
+ <div class="field-item <?php print ($count % 2 ? 'odd' : 'even') ?>">
+ <?php if ($label_display == 'inline') { ?>
+ <div class="field-label-inline<?php print($delta ? '' : '-first')?>">
+ <?php print $label ?>:&nbsp;</div>
+ <?php } ?>
+ <?php print $item['view'] ?>
+ </div>
+ <?php $count++;
+ endif;
+ endforeach;?>
</div>
</div>
<?php endif; ?>