[Zope] How does dtml-sqlgroup really work?
Fri, 07 Jun 2002 19:48:34 +0200
Jorge O. Martinez wrote:
> Hi all:
> Thanks for your help. In the end I had to use this ugly thing, but it
> works, slightly dissapointed I could not get sqltest & sqlgroup to
> work....maybe I'll have to time to dig deeper later, and understand it
> better when I increase my Zope Zen ;-). Thanks!
IIRC it's right that sqltest needs the existence of the variable you
test for (it's not like <dtml-if variable_name>).
But you can set (create) the variables you test for easily at the
arguments field of the ZSQL method (don't remember it's exact name
although I stared at one for some time today). Anyway, there's a text
field at the edit-tab of a ZSQL-method where you can define the
variables it expects - look at the relevant docs.
So, there you can write something like (again IIRC)
which sets my_variable to '' if it isn't in the namespace and didn't get
If you use that for all you variables, <dtml-sqltest bla> will work as
expected (since '' == false).