[Zope] Zope site's sidebar

Michel Pelletier michel@digicool.com
Mon, 12 Apr 1999 09:41:42 -0400


> -----Original Message-----
> From: Craig B. Allen [mailto:cba@mediaone.net]
> Sent: Sunday, April 11, 1999 11:39 PM
> To: zope@zope.org
> Subject: Re: [Zope] Zope site's sidebar
> 
> > One is the sidebar on the zope site, it is the menu and 
> News column that
> > runs down the left hand side. What is a sidebar_contents, 
> is it a object
> > type, a folder, or something else?
> 
> I'd say it's a method that returns a list, maybe from an internal or
> external data store.
> You can look at something here:
> http://www.zope.org/dtml_source?path=/sidebar_contents&pp=1 
> but in Zope
> it's hard for me to be sure whether stuff is real or virtual.  Anyway,
> sidebar_contents seems to do something like I've been trying to
> implement on my pages: display 'sibling' links but show the 
> current page
> NOT as a link.
> 
Good guess.  It's actually a property of type 'Lines'.

> 
> > The second thing that I had a question about was the navbar 
> that runs
> > across the top of each page. Is that a static element stored in the
> > highest folder of the different sections or dynamicly created?
> 
> You can look at the code for the navbar using
> http://www.zope.org/dtml_source?path=/pathlinks&pp=1 which I 
> discovered
> after following the link you provided to the sidebar code.  My python
> skills are as yet almost nonexistent so the meaning of the code I can
> only guess at, but I'd say it is generated dynamically.
> 

Well it's dynamicaly generated from a staticly assigned variable,
'menu_bar_items'. :)  It does not get anything from anywhere to generate
it's code.  It's actually a 'hook' for the future so that the navbar can
be dynamic, but it was never improved upon.  Look in the dictionary
under 'cruft'.

-Michel