RE: [Zope] Newbie:Navigational bar
Thanks. If you need me to write a short piece around the code that explains what it does, and how, let me know. I read your navbar howto, which is well-written and usable. However, personally I think that manually putting URLs in a TinyTable and iterating that goes against the grain, or the zen if you will, of Zope itself. Say somebody adds a page, removes a page, or changes a title -- you have to go over the TinyTable manually. On some of my pages I use another scheme which revolves around marking public documents with a "public" property and enumerating those. The code looks a bit like this: <!--#call "REQUEST.set('thistitle', title_or_id())"--> <!--#in "PARENTS[0].objectValues(['DTML Document', 'Folder'])"--> <!--#if "_.has_key('IsPublic') and IsPublic"--> <!--#if "thistitle == title_or_id()"--> <img src="/Images/activedoc.gif" width="8" height="8"><b><!--#var title_or_id--></b><br> <!--#else--> <img src="/Images/spacer.gif" width="8" height="8"><a href="<!--#var id url_quote-->"><!--#var title_or_id--></a><br> <!--#/if--> <!--#/if--> <!--#/in--> This lists all documents and folders on the current level that have an IsPublic property that is non-null, and also displays a "you are here"-type of bullet next to the active document's title. All other entries are given as links. No need to maintain a TinyTable, as the code will discover which documents are published. The drawback, of course, is that it only enumerates documents in its immediate parents: If you'd like to place site-wide links in this list, you could just iterate through PARENTS[-1] as well. All three schemes serve slightly different purposes, but deserve equal mention, I think. -- Alexander Staubo http://www.mop.no/~alex/ "In the end, we all assume room temperature." --John Maynard Keynes
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Jules Allen Sent: 11. juni 1999 15:14 To: aem@byu.edu Cc: Zope List Subject: Re: [Zope] Newbie:Navigational bar
Good Morning. In addition to the code you got from Alexander, there's a draft of a tutorial at
http://zdp.zope.org/test/jules/navbar_howto_html
I think we need to do two versions of the navbar tutorial -- one based on Alexander's code and one based on the TinyTable. Both clearly have different uses but are equally important.
Good luck!
On Thu, Jun 10, 1999 at 07:05:33PM -0600, Adrian Esteban Madrid wrote: |Anybody has any idea/tutorial/rumors on how to create a navigational bar |like this? | |Home : Community : InvestorsCorner : Introduction : Disclaimer | |Each item can be linked, so you can step back to Community skipping |Introduction with one click. | |Any ideas would be appeciated. | |-aem | | |_______________________________________________ |Zope maillist - Zope@zope.org |http://www.zope.org/mailman/listinfo/zope | |(For developer-specific issues, use the companion list, |zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(For developer-specific issues, use the companion list, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
At 04:46 PM 6/11/99 +0200, Alexander Staubo wrote:
All three schemes serve slightly different purposes, but deserve equal mention, I think.
Thanks for the comments and it looks like I might have two more versions of the navbar to write up :-) The original navbar doesn't require the user to be totally organized. With sessions/versions you should never have to create test folder or a trash_html but that isn't always the case. If you look back to the tree control cry-for-help that got me started on this, I originally just wanted a simple way to hide my images folder. An auto-generating navbar would show so clearly navbar-TinyTable does have a purpose if only for the root folder. Maybe if you could email me (off-list if you like) two or three examples of why your version would be better for a specific purpose, that would help me write up a much better doc. Cheers, Jules -- Codito, ergo sum.
Jules Allen wrote:
At 04:46 PM 6/11/99 +0200, Alexander Staubo wrote:
All three schemes serve slightly different purposes, but deserve equal mention, I think.
Thanks for the comments and it looks like I might have two more versions of the navbar to write up :-) <snip> Maybe if you could email me (off-list if you like) two or three examples of why your version would be better for a specific purpose, that would help me write up a much better doc.
This sort of feature, as used on Yahoo and other directory sites, is typically called 'breadcrumbs' in my experience. I'd like to add my endorsement, as it is essential while navigating 'wide-and-deep' information spaces, to inform people not only where they are, but how they got there. As an aside, I find that using a '>' symbol as a delimiter generally improves end-user comprehension. Michael Bernstein.
On Fri, 11 Jun 1999, Alexander Staubo wrote:
public documents with a "public" property and enumerating those. The code looks a bit like this:
Yes I have followed a similar approach which contains fixed global navigation links, local ones, and directories that contain special attributes. I can send the code to anybody who is interested. Pavlos
At 16:46 11-6-99 , Alexander Staubo wrote:
I read your navbar howto, which is well-written and usable. However, personally I think that manually putting URLs in a TinyTable and iterating that goes against the grain, or the zen if you will, of Zope itself. Say somebody adds a page, removes a page, or changes a title -- you have to go over the TinyTable manually.
Hell, I just copied the code from Zope.org when I was quickly updating the ZDP look and feel to mach Zope.org =) I can't help it someone wanted to use the code for a tutorial =). I added the TinyTable, Zope.org uses a lines property on the Folder, as I recall. Both the Zope and the ZDP site have _two_ navigation bars, one on the top (which was used for the tutorial), and one one the left. They complement each other. The one on the top gives a short list of main areas, the one one the left gives details of the current area. Because ZDP is being maintained by a growing group of people, all with access to the management interface, the TinyTable approach gives them the oppertunity to both specify the navigational structure of their part of the site, and to use whatever structure within their Folder they see a need for. There are no strange side effects when copying objects from one place of the site, to another. Another advantage is that the TinyTable is ordered, so the links always appear in the order that the maintainer specified. On sites where I have full control over who adds objects, and the way they do this, I do build the navigation totally automated, if possible. -- Martijn Pieters, Web Developer | Antraciet http://www.antraciet.nl | Tel: +31-35-7502100 Fax: +31-35-7502111 | mailto:mj@antraciet.nl http://www.antraciet.nl/~mj | PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149 ------------------------------------------
participants (5)
-
Alexander Staubo -
Jules Allen -
Martijn Pieters -
Michael Bernstein -
Pavlos Christoforou