[Zope] Re: <dtml-in> problem with defined or not defined variable
as parameter
Josef Meile
jmeile at hotmail.com
Thu Sep 9 09:37:51 EDT 2004
> I've seen the other replies, but I think your original example should
> work too (I haven't used dtml in a long time, so I'm not sure). The
> problem here is that each "<dtml-in>" has to have an own closing tag:
>
> <dtml-if id_historie>
> <dtml-in expr="dbSelect(id_historie=_.str(id_historie))">
> Do something
> </dtml-in>
> <dtml-else>
> <dtml-in expr="dbSelect(id_historie=_.str(0))">
> Do another thing
> </dtml-in>
> <dtml-if>
Ops, I realized that this peace of code is ineficient and the <dtml-let>
suggestion is better. Anyway, keep on mind that for each <dtml-in> you
have to have a </dtml-in>
More information about the Zope
mailing list