Hi again,
for the records, replying my own recent post:
the way to test if a variable exists in a zsql method is through has_key NOT hasattr.
In other words: <dtml-if "_.has_key('foo')">...</dtml-if>

Sorry for bothering, it's been a long time not dealing with dtml....

Pablo Ziliani wrote:

Hi everyone,
I have what I think is a banal question here... Is there any way I can test inside a zsql method if an argument has been passed? <dtml-if foo> won't work because 0 (zero) is an expected value. Have tried <dtml-if "_.hasattr(_, 'foo')"> but it seems to be always false (where's that namespace?)


Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to