[Zope] SQL tree-crawling and DTML

Dieter Maurer dieter@handshake.de
Mon, 10 Sep 2001 22:17:33 +0200 (CEST)


tom smith writes:
 > ...
 >        <dtml-var  "tree(parent=category_parent_id)">
 > 
 > This works fine if it makes 1 iteration, but fails if it calls itself. I
 > get..
 > 
 > Error Type: NameError
 > Error Value: category_sql
DTML objects have two positional parameters, called
"client" and "REQUEST".
If your DTML object is not trivial, you must pass at least
one of them.

If you use a DTML object, say "o", as a "name" attribute to a DTML command,
then, it will be called with:

      o(_.None,_)

i.e. "client" is "None" and "REQUEST" is the DTML namespace.

More information

  <http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html>




Dieter