[Zope] Variable name of the ZOPE root? For use in TREE
Chris Withers
chrisw@nipltd.com
Sat, 22 Apr 2000 15:14:15 +0100
> I believe that ... branches_expr="PARENTS[-1].objectValues('Image')" ...
> should serve your need.
Hmm, it may not. That will show the objects contained in the root folder under every object in the
tree, creating nasty infinite-tree-depth situations.
I think you may want:
<dtml-tree expr="PARENTS[-1]" branches_expr="objectValues('Images')">
(which I use a lot...)
I wish the <dtml-tree> documentation was better. This comes up all the time on the list. It's
particularly bad because, by its nature, it brings up the complicated side of Zope: aquisition,
python lists, objectValues, etc.
It's also a bit buggy. expand_all was broken for ages and the above doesn't work if "PARENTS[-1]"
doesn't have expr= in front of it. The HTML it generates can be 'interesting', especially using the
header and footer attributes, and there's practically no control over the state of the tree's
expansion through DTML. Oh, and you have NO control over the formatting of the table that the tree
tag produces.
That aside, it's great ;-)
The documentation is a ZDP issue, I think, and at some stage I'm hopefully going to have the chance
to play with TreeTag.py and fix some of the things that niggle me...
cheers,
Chris