XF 2.0 nth-child(even) on forums, how to do in XF2

Robert9

Well-known member
In XF1 i just set an nth-child(even) to my <li for the subforums under a category.
Now we have divs and i cant work it out to do the same now. It seems every div is again the number one.
So may someone know how to alternate the colors at forum_list for the forums under cats?
 
Maybe i need a loop in the template itself for that?

<xen:foreach loop="..." i="$i">

and

... style="background-color: {xen:if '{$i} % 2', '#fff', '#eee'};"

I dont like to make more code, XF2 seems anyway really slow to me, but if it needed ...
 
Back
Top Bottom