zebra striping class showing only odd

mndonx - August 27, 2008 - 06:20
Project:PHPTemplate
Version:4.6.x-1.x-dev
Component:Template Defaults
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

I've added a $zebra class to li's on a custom list view theme, but it's only adding "odd" -- no "even" classes. Any ideas? The list theme looks like this:

<div class="item-list" >
  <?php if (!empty($title)) : ?>
    <h3><?php print $title; ?></h3>
  <?php endif; ?>
  <<?php print $options['type']; ?>>
   <?php foreach ($rows as $row): ?>
    <li class="<?php print $zebra; ?>">
      <?php print $row ?>
    </li>
    <?php endforeach; ?>
  </<?php print $options['type']; ?>>
</div>

#1

mndonx - August 27, 2008 - 17:20

Well, I solved that almost immediately after posting. I should have been theming a views-view-field template tpl instead of views-view-list.

 
 

Drupal is a registered trademark of Dries Buytaert.