[Zope] Creating a menu for each page

Chris Withers chrisw@nipltd.com
Wed, 16 Feb 2000 11:43:06 +0000


You should look at the tree tag.

I tried to do this too but gave up in the end...

Try the following in standard_html_header:

<dtml-tree expr="PARENTS[-1]" branches=objectValues>
 <!-- your item rendering code here, a simple example: -->
 <dtml-var id>
</dtml-tree>
 
The problem I couldn't solve was causing the appropiate branch to be open in the
tree when you're in a given page. 
The tree maintains it's state with a cookie, but if you link to a page from
somewhere else, the tree won't necessarily open to the appropriate place for
that page. You'll see what I mean, if you solve it, let me know :-)

Good places to look are pages 48-51 of the Zope DTML Guide and the Tree Tag
How-To...

If you find out how to get a tree to open to a certain node, let me know! :-)

cheers,

Chris