hello everyone, I guess I don't know much about dtml-if statements. I was wondering how I could write a dtml if loop in zope to alternate the color of the cell for the results page in after a search. how would I translate this logic into dtml?: var = 0 if((var%2))==1) then color="#dddddd" var = var + 1 else var ="#ffffff" var = var + 1 Thanks ahead! -jon
If you are using a <dtml-in> statement to 'list' your search results, you can simple use this: <dtml-in searchresults> <dtml-if sequence-even> <TD BGCOLOR="#dddddd">Even numbered cell starting at 0</TD> <dtml-else> <TD BGCOLOR="#ffffff">Odd numbered cell starting at 0</TD> </dtml-if> </dtml-in> Regards, Adam On 26-Apr-2000 Jonathan Park wrote:
I guess I don't know much about dtml-if statements. I was wondering how I could write a dtml if loop in zope to alternate the color of the cell for the results page in after a search.
-- M. Adam Kendall | Got Linux? Internetworking & | We do. Security Architect | akendall@devis.com | http://www.devis.com
Jonathan:
hello everyone,
Howdy.
I guess I don't know much about dtml-if statements. I was wondering how I could write a dtml if loop in zope to alternate the color of the cell for the results page in after a search.
<dtml-in Catalog> #assuming you are using results from the Catalog <dtml-if sequence-index-even> Do this <dtml-else> Do that </dtml-if> </dtml-in> All my best, Jason Spisak CIO HireTechs.com 6151 West Century Boulevard Suite 900 Los Angeles, CA 90045 P. 310.665.3444 F. 310.665.3544 Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats.
participants (3)
-
Jason Spisak -
Jonathan Park -
M. Adam Kendall