[Zope] Tree tag and namespaces

Dieter Maurer dieter@handshake.de
Fri, 2 Mar 2001 21:34:41 +0100 (CET)


Lars Heber writes:
 > ...
 > He wanted to write an own dtml method for the tree tag which returns a
 > user specified list of objects. He had the problem that calling that
 > method with the tree tag always raised an attribute error about REQUEST.
 > ...
 > In the mean time, does anybody have a workaround for that, please?
There is the "branches_expr" attribute to "dtml-tree".

You can use it like this:

    <dtml-tree ... branches_expr="yourDTMLmethod(_vars.None,_vars)">
      ....
    </dtml-tree>

 > Or do I necessarily have to use Python?
Now, with PythonScripts, it is worth to learn Python (it was before,
but now it is even more rewarding). You should not need more
than a few days.

 > I want to know if there is a possibility to let a DTML method return
 > such a list or is it absolutely necessary to learn Python?
    <dtml-return "any of your favorite lists">


Dieter