[Zope] - Using tree as a show/hide section within a document

Brad Clements bkc@murkworks.com
Wed, 20 Jan 1999 21:58:39 -0400


Given a document with several sections (say 4), each section can be 
very long.

I'd like the user to have the option of "expanding" a section, or keeping it 
"compressed" within the document. 

It looks like <!--#tree--> would be able to do this if I could provide a 
suitable branches and leaves function.

What I'd like is a document that looks like this:

Header info always the same

+ Click to see detailed part A
+ Click to see detailed part B
+ Click to see detailed part C

A user could have clicked on section B, so then they'd see

+ Click to see detailed part A
-  Click to hide detailed part B
  Here are the details in part B
  ...
+ Click to see detailed part C

The tree elements would need to be in a document. It would be nice if it 
didn't need real leaf elements, but I could put parts a,b and c in other 
documents within the folder that holds the main document. 

Anyone have any suggestions how I could do this?

How is "expr" used within #tree ? I couldn't find any mention of it in the 
source..

Thanks for any tips



Brad Clements,                bkc@murkworks.com   (315)268-1000
http://www.murkworks.com                          (315)268-9812 Fax
netmeeting: ils://ils.murkworks.com               ICQ: 14856937

We must come down from our heights, and leave our straight 
paths, for the byways and low places of life, if we would 
learn truths by strong contrasts; and in hovels, in forecastles, 
and among our own outcasts in foreign lands, see what has been 
wrought upon our fellow-creatures by accident, hardship, or vice. 
- Richard Henry Dana, Jr. 1836