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

merlinofchaos’s picture

All 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.

sprugman’s picture

I 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....

ztyx’s picture

+1 I agree.

merlinofchaos: What are the reasons not to implement this in the default template? Worth proposing a patch?

ztyx’s picture

Version: 6.x-2.0-rc1 » 6.x-2.0-rc3
merlinofchaos’s picture

It 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.

stephthegeek’s picture

Putting 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.

merlinofchaos’s picture

Status: Active » Fixed

I 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.

ztyx’s picture

Great! Thanks!

stephthegeek’s picture

Wow, you rock, thank you!!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.