[Zope] Mimic HelpSys

Martijn Pieters mj@antraciet.nl
Mon, 17 May 1999 16:58:36 +0200


At 16:18 17/05/99 , Tom Deprez wrote:
>Hi,
>
>I was trying to mimic the tree which you can see when you open the HelpSys.
>I would like to use it for our "ZBook" at ZDP.
>
>However I can't find the source of this, so I try to make it myself, but
>I've some problems, maybe someone can give me a hand?
>
>Ok.
>
>We've a folder 'Introduction', with sub folders 'zig_main', 'zig_menu' and
>'Outline'. Then index_html of 'introduction' contains a frame page to
>'zig_main' and 'zig_menu'.
>
>In Outline, I've put several subfolders with subfolders each containing a
>chapter of the book.
>
>What I want to do now is this : In subfolder 'zig_menu', create a tree from
>the contents of 'Outline'. This that all subfolders and documents titles
>are displayed.
>
>When clicking on a link in the tree the document the document is displayed
>in the main frame.
>
>I've already problems of creating the tree in zig_menu! :-(
>
><!--#tree /Introduction/Outline -->
>
><!--#/tree-->
>
>doesn't work... And how do I get all the subfolders and documents in a tree?
>
>Can someone help?


As I don't see these pages on ZDP, here is the code you're looking for by 
email:

<!--#tree Outline branches_expr="objectValues(['Folder', 'DTML Method', 
'DTML Document'])" nowrap=1-->
<A TARGET="?" HREF="<!--#var URL2-->/Outline/<!--#var 
tree-item-url-->"><!--#var title_or_id--></a>
<!--#/tree-->


The tag selects the acquired Outline object as a base, and specifies that 
it wants all Folder, DTML Method and DTML Document objects to be branches. 
The URL is constructed using the URL of the documents second parent. If the 
document you place this in is a DTML Method, that probably should be URL1, 
I did it with a DTML Document, and then it is URL2. Finish off the URL with 
the /Outline/ part and the URL to the item displayed.

You will have to fill in the TARGET attribute, as I did not know the name 
of that subframe.

You might want to add icons, like the open and closed books. Look at 
lib/python/HelpSys/helpsys_menu.dtml for ideas.

--
Martijn Pieters, Web Developer
| Antraciet http://www.antraciet.nl
| Tel: +31-35-6254545 Fax: +31-35-6254555
| mailto:mj@antraciet.nl http://www.antraciet.nl/~mj
| PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149
------------------------------------------