[Zope] Left navigation bar; how to implement one.

Lennart Regebro lennart@torped.se
Sun, 15 Dec 2002 01:11:08 +0100


From: "Hans Deragon" <hans@deragon.biz>
>    I searched in many places, but I could not find an example on how
> to create a left navigation bar with Zope.  I might have some ideas,
> but I would like to hear from you oldies (as opposed to newbies) the
> most efficient way to create one.  Off course, the left navigation bar
> should show up on each web page of the site, it would expand as the
> user goes in deeper on the site and you would only need to write it
> once and use it on all of the web pages.
>
>    I am a newbie to Zope, but not in html or python.

There are many options, depending on what functionality you want. Should the
menu be completely static, or should it change depending on where you are?

I think the best way to do this is to make each document a folder, that
contains both subdocuments (other folders) and the contents of the document.
The contents is most easily put into a DTMLMethod that you call "content" or
something obvious like that.

You can the create a template (either a DTMLMethod or a PageTemplate) in the
root that contains the design, and inserts the "content" DTML-method in each
page. This will mean that you only have the design in one place (the root)
and use it for all document.

You then create the menu as a part of this template, and you can have a menu
that lists all the sub documents of the document you are currently viewing.
Use OrderedFolder for the documents so you control the order or the
subfolders.

That's it really. It's your own content management system, and it takes a
couple of hours to make. :-)