Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.0-rc3
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
11 Jul 2008 at 19:56 UTC
Updated:
14 Oct 2008 at 20:11 UTC
Any chance we can add striping (odd/even/first/last) to the viewed items, at least for list views? I know it can be achieved in various ways through theming, but it's really useful, and would be pretty easy to add to core, I would think.
Comments
Comment #1
merlinofchaos commentedAll templates have $zebra available, which should flip odd/even every time a particular template is invoked. Though I guess that won't help you with first/last.
Comment #2
sprugman commentedI know I can add it with templating. I'm suggesting (requesting) that you put them in by default. I almost always want to change either the first or last item's css to get rid of a fence-post border or something....
Comment #3
ztyx commented+1 I agree.
merlinofchaos: What are the reasons not to implement this in the default template? Worth proposing a patch?
Comment #4
ztyx commentedComment #5
merlinofchaos commentedIt tends to add complexity to the templates and I'm trying to get the simplest templates possible so that they are easily edited.
Also, it's not a high priority for me. That said, a well written patch has more likelihood of succeeding here.
Comment #6
stephthegeek commentedPutting in a big +1 for zebra and first/last there by default for views. Simple is good, but generically useful 90% of the time is better :D
Tracking this in case I can scrounge up some resources to tackle it.
Comment #7
merlinofchaos commentedI added row classes (first, last, even, odd, row number) to the unformatted and list styles. When you update be sure to clear your cache so that the new preprocess functions get picked up.
Comment #8
ztyx commentedGreat! Thanks!
Comment #9
stephthegeek commentedWow, you rock, thank you!!
Comment #10
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.