[Zope] <dtml-in> problem with defined or not defined variable as parameter

Patrick Ulmer ulmer at truckport.de
Thu Sep 9 04:20:44 EDT 2004


Hi,

>> I want to do something like that:
>>
>> <dtml-if id_historie>
>> <dtml-in expr="dbSelect(id_historie=_.str(id_historie))">
>> <dtml-else>
>> <dtml-in expr="dbSelect(id_historie=_.str(0))">
>> <dtml-if>
>>
>> [...]
>>
>> </dtml-in>
>>
>> but I get the error " unexpected end tag, for tag </dtml-in>". How 
>> can I query my database depending on having id_historie defined or 
>> not? Can somebody give me a hint?
>
>
> In the exaple above I would set id_historie in a <dtml-let> tag:
>
> <dtml-let id_historie="id_historie or 0">
> <dtml-in expr="dbSelect(id_historie=_.str(id_historie))">
> ...
> </dtml-in>
> </dtml-let>


Sorry, but now I got the error "global name 'id_historie' is not
defined" in line <dtml-let....>.

Best Regards,
Patrick Ulmer




More information about the Zope mailing list