[Zope] newbie dtml/zCatalog???

Jonathan Park jpark@amazingmedia.com
Wed, 26 Apr 2000 17:22:15 -0400


Thank you for all your help!
Have a great day!
-jp :)

-----Original Message-----
From: Mauricio Souza Lima [mailto:mauricio@hiper.com.br]
Sent: Wednesday, April 26, 2000 5:02 PM
To: Jonathan Park
Subject: Re: [Zope] newbie dtml/zCatalog???


Ok, you are trying to do a switch between one color and other, you should
try this:
<dtml-in list>
<tr bgcolor="
<dtml-if sequence-even>
#dddddd
<dtml-else>
#ffffff
</dtml-if>
"><td><dtml-var sequence-item></td></tr>
</dtml-in>

See the meta-variables of the dtml-in tag, it has some powerful tools...

[]'s

Mauricio Souza Lima

-----Mensagem original-----
De: Jonathan Park <jpark@amazingmedia.com>
Para: zope@zope.org <zope@zope.org>
Data: Quarta-feira, 26 de Abril de 2000 17:44
Assunto: [Zope] newbie dtml/zCatalog???


>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
>
>
>_______________________________________________
>Zope maillist  -  Zope@zope.org
>http://lists.zope.org/mailman/listinfo/zope
>**   No cross posts or HTML encoding!  **
>(Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
>