From: "Cornelis J. de Brabander" <brabander@fsw.leidenuniv.nl>
Now, I could be wrong and count-value is 1 based in stead of 0 based. In fact, I believe it is, it would make sense anyway. Then you'd adjust the logic slightly, something like (_['count-value'] - 1) % 4.
Count-xxx does not change during the sequence, it simply gives the number of non-missing xxx-values in the sequence. Furthermore, refering to the response of Jim Sanford, the solution can do without integer or sting conversions:
(tested!!!)
<TABLE> <dtml-in objectValues> <TR><TD><dtml-var sequence-number></TD> <TD> <dtml-if "_['sequence-number']!=0 and _['sequence-number']%2==0">even <dtml-else> odd </dtml-if> </TD></TR> </dtml-in> </TABLE>
Whoops. Thanks, Cornelis. -- Martijn Pieters | Software Engineer mailto:mj@digicool.com | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ | The Open Source Web Application Server ---------------------------------------------