Hi! this is just an idea/observation that I believe would make views usage way more flexible: Wouldn't it be nice to be able to dynamically add a custom class to each row of a view? and even better, use tokens to populate such class?

A usage example would be if you are pulling different content type nodes into the view, and you want to theme the rows depending on such content types. So if I were to pull, let's say, Videos, Podcasts, and Articles, content types, and I wanted Videos to have a blue background, Podcasts a bigger font size and Articles to be bold (extreme theming, I know, but it's just an example :D )

Currently I am able to do such a granular theming with custom templates, which ends up adding many files to my theme folder. I believe this would be an extremely useful feature, since it would bring all that work to the front UI.

Thanks!! :)

Comments

merlinofchaos’s picture

Status: Active » Fixed

In the unformatted and table styles, you can use tokens in the row classes already, at least in recent 3.x-dev

Mariano’s picture

ops, mislabeled the post... I am using 2.x
I guess that answers my question then... I'll look into it... thanks for the quick answer ;)

Status: Fixed » Closed (fixed)

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