Ventrian Product Forums

We've moved our Product Forums!
To better assist our customers, we've moved to an integrated knowledge base and ticketing system. You can access the new forums at http://support.ventrian.com.
Subject: IF ([ITEMINDEX] % 2)
Prev Next
You are not authorized to post a reply.

Author Messages
GussUser is Offline
Registered Users
Ventrian Addict
Ventrian Addict
Posts:89


3/29/2012 12:07 AM  

Hi Scott

I'm doing a fancy layout of the item list (newpaper style, multiple column) and although I can do it with fancy CSS (float and widths, block-inline etc, there is always the odd little tweak that can not be done.

A type of token that could be handy is ([ITEMINDEX] % 2), which tells me if its an ODD or EVEN index number, and therefore I can manipulate the right and the left column seperately through css.

 

Example

[EXPRESSION:[ITEMINDEX] % 2:=:TRUE]

/* COLUMN 2's overide CSS calss here */

[/EXPRESSION:[ITEMINDEX] % 2:=:TRUE]

Any way you know how to achieve this with the existing tokens.

Scott McCullochUser is Offline
Administrators
Ventrian Master
Ventrian Master
Posts:21233


3/30/2012 5:47 AM  
Hmm, I thought there was an ISODD and ISEVEN.

You could probably also using jQuery for this:

$(‘tr’:odd).css({backgroundColor: ‘#ccc’});

Scott McCulloch
Site Administrator
You are not authorized to post a reply.
Forums > Modules > News Articles > IF ([ITEMINDEX] % 2)



ActiveForums 3.7
We've moved our Product Forums!
To better assist our customers, we've moved to an integrated knowledge base and ticketing system. You can access the new forums at http://support.ventrian.com.