Hi all,
I use Omega & similar theme that using CSS grid system like 960gs, but with view I can't assign to each row a set of specific class (grid-X, push-Y, alpha, omega, ...). It can be assumed that this feature is usefull to reduce CSS properties duplication and for rapid implmentation of theming functionality.

CommentFileSizeAuthor
#1 views-rows-class-1188216-1.patch4.34 KBmavimo

Comments

mavimo’s picture

Status: Active » Needs work
StatusFileSize
new4.34 KB

First version of patch. To customize CSS class for each row you can use UI visibile in: http://tinypic.com/view.php?pic=n34652&s=7

User can define a set of common class (first/last, odd/even) but also a class for each rows.

This is a FIRST, ALPHA patch and it isn't tested on production site.

To apply this patch:

git clone --branch 7.x-3.x http://git.drupal.org/project/views.git
cd views
git checkout 7.x-3.0-beta3
wget http://drupal.org/files/views-rows-class-1188216-1.patch
git apply -v views-rows-class-1188216-1.patch
mavimo’s picture

Status: Needs work » Needs review

Create a separate module (temporarey a sandbox) to have this functionality.

You can find it at:

chrisjlee’s picture

Has this been fixed in views 3.0?

dawehner’s picture

No, the status is on needs review.

In general i'm not sure whether we need all this css classes.

mavimo’s picture

@dereine: this calsses are usefull when using a grid system and chise to have a asymmetric, Eg:

|--4--|--4--|--4--|
|--------12-------|
|----6---|---6----|
|--4--|--4--|--4--|

I can create a only one views inside a views with 3 attachment (and stile each one different), or:

|--5--|---7---|
|---7---|--5--|
|--5--|---7---|
|---7---|--5--|

PS: I'm working on improved and more flexible system to change css/tag

dawehner’s picture

Well there are always things which are helpful for a certain type of people, but please think of the 80/90%
There is nothing which prevents you from doing that.

dawehner’s picture

Status: Needs review » Closed (won't fix)

Thanks for providing a patch, though views simply can't provide all possible features out of the box.

You already have created a sandbox to get this functionality, let's mark it as won't fix