Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hey Stalski,
I noticed that the zebra striping on the blocks is different than the zebra striping on the page displays. For example, in blocks the first row starts with even, in the page, the first row is odd. This is a very minor issue, but it creates a weird user experience for my site as I've converted the filter bar into AJAX and I'm using AHAH to bring back the filtered messages, so when a filter is used the striping changes.
I have a pretty hacked out version of heartbeat, so I was curious if this is a known issue before I go searching for the source of the problem.
Comments
Comment #1
Stalski CreditAttribution: Stalski commentedI am sorry, I noticed the zebra is a static count in core. There is no way in drupal6 to reset that after processing the first themed list. I can only refer to this issue where the same answer stands: #360550: how to reset $zebra/$id for each instance of a view
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commented$zebra is not reset per instance, e.g. two block instances of the same view will accumulate counts. To add more granularity, you can do this in your template.php (and flush cache after adding):
Now $zebra_hook is an array with the counts per hook. For example, you can use $zebra_hook['node'] or $zebra_hook['my_entity']. This allows for a bit more granularity in $zebra striping and $id counting.