[Zope] Using odd numbers (TMTOWTDI :)

tom smith tom@othermedia.com
Tue, 24 Apr 2001 10:27:01 +0100


On Monday, April 23, 2001, at 11:21 AM, gitte@localhost wrote:

> Okay I got it to work - sort of :-)

Just to muddy the waters, and because I also didn't know about 
sequence-item-odd, here's the way I created a list of links with 
different coloured backgrounds (using a folder full of RSSChannels)....


<dtml-in "daily_feeds.objectValues()" sort='id">
	<dtml-let x=sequence-item>

		<dtml-in expr="x.objectValues()" 
sort=bobobase_modification_time reverse=yes size=10>

			<tr >
				<td  <dtml-if "not (_['sequence-index'])%2">
						bgcolor="#C0C0C0"
					</dtml-if>
				>
					<a href="<dtml-var link>" target="_blank" 
 ><dtml-var title></a>				</td>
			</tr>

		</dtml-in>
	</dtml-let>

</dtml-in>

....cheers

tom