[Zope] dtml-tree does weird things

Dieter Maurer dieter@handshake.de
Sat, 14 Oct 2000 23:14:32 +0200 (CEST)


Matt writes:
 > <dtml-tree branches_expr="folder_of_things.objectValues(['Folder', 'DTML
 > Document'])">
 >    <dtml-var id>
 > </dtml-tree>
 > 
 > the folder folder_of_things contains numerous things, including some
 > documents and folders.  The problem seems to be that each time I expand the
 > tree node, I get a repeat of the original list of nodes, as if it is
 > listing itself recursively, but not decending down the object hierachy.
You have read the description for "branches_expr" carefully?

   It is the expression used by Zope to find the branches of
   the current object.

In your case, the expression is independent from the current
object. Therefore, it returns always the same branches (as you
observe).

Try:

<dtml-tree folder_of_things branches_expr="objectValues(['Folder','DTML Document'])">
....


Dieter