The default template use odd and even class for each items.

The issue is when you use grouping field, the odd/even classe doesn't reinitialiazed at each group.

For example suppose you have a view which send 8 results, group by a group fild which has 3 values A, B,C, such as
A -> 3 items
B->3 items
C-> 2 items
I have the field
A
item 1 -> odd
item 2 -> even
item 3 -> odd
B
item 4 -> even
item 5 -> odd
item 6 -> even
C
item 7 -> odd
item 8 -> even

If i want to display my items in 2 columns with this properties
odd -> float:left
event -> float: right.

The correct order dosen't match because the first item is not the same.

I think the cprrect implementation would be
A
item 1 -> odd
item 2 -> even
item 3 -> odd
B
item 4 -> odd
item 5 -> even
item 6 -> odd
C
item 7 -> odd
item 8 -> even

Comments

manuel garcia’s picture

Just wanted to confirm this is the case, I'll dive into it when I get some free time from work. I'm not sure this is doable but we'll see.

Patches are welcome of course:

These classes are setup in the function template_preprocess_views_view_accordion, line 58 of views_accordion.module file.

manuel garcia’s picture

Actualy, I just double checked, this isn't the case after all, at least I'm not seeing with views 3.

Are you using views 2? can you check if it happens with views 3? It could be a bug in views 2...

Roulion’s picture

I use view3. Il will try with the last dev version and tell you

Roulion’s picture

I still have the issue. (even in 1..5 version.)

rstark’s picture

Issue summary: View changes

Just wondering if this has ever been resolved? I am trying to zebra-stripe my accordion listing and could use some pointers.

Thanks!

manuel garcia’s picture

Status: Active » Closed (outdated)

Closing now due to 6.x no longer supported.

graysonecooper’s picture

Title: Odd/even class and groupinfg field » Odd/even class and grouping field
Version: 6.x-1.4 » 7.x-1.x-dev
Issue summary: View changes
Status: Closed (outdated) » Closed (duplicate)