How do I make a three level nav bar?

Brian V Hughes brianvh at Dartmouth.EDU
Tue Mar 26 14:10:39 PST 2002


Ok. Here are the URLs for those scripts that I said I would post:

<http://www.dartmouth.edu/~hades/frontier/navbarii.sit>
<http://www.dartmouth.edu/~hades/frontier/hierarchynav.sit>

The first one goes into user.html.macros, and operates on Frontier 
NavBar outlines, but allows you to nest items under other items. 
Those that are nested, it does checks against to determine if they 
should be displayed, based on the location of the current page being 
rendered. The important thing to note here is pages that you nest 
need to physically be located "below" the sub-heading page. If they 
aren't it will confuse the script and you won't get what you expect. 
Also, only address pointers to pages are supported by the script, but 
it would be possible to add support for other types of pointers.

The second script, which will place itself into the workspace table, 
is for rendering the same kind of collapsing and expanding navigation 
outline for Manila site hierarchy XML structures. It's pretty basic 
with it's method of styling links on the left. If it's a category, 
it's bold and if it's just a page it's not bold. Also, it correctly 
inactivates the link to the current page. NavBarII is much more 
configurable.

As I've said, they are lightly commented, if at all. But I like to 
think that I write clean code. ;-> I'm happy to answer questions, but 
these scripts are provided "as is". I don't have time to provide 
support, bug fixes (I'm sure there are a few, just no deal-stoppers) 
or feature requests.

-Brian
--
Brian V. Hughes                          <http://www.dartmouth.edu/~comm/>
Webmaster                                Dartmouth College Computing Services
Webmaster Group                          Communications Services

--On 03/25/2002, Brian V Hughes wrote:
>I've got a navBar macro that can handle multi-level navigation bars. 
>It's loosely based on the original navbar macro that comes with 
>Frontier, but handles multiple levels and renders the navigation bar 
>like an expanding and collapsing outline, based on the location of 
>the page being rendered.
>
>We use it here in our web site production for Dartmouth departments, 
>and I'd be happy to share it with you. You would probably want to 
>make changes to it, depending on what your display needs are, but 
>you're welcome to hack the code up anyway you like. It makes use of 
>the regex verbs, so you'll need to make sure you have those 
>installed.
>
>Let me know if you are interested in looking at it, and I'll make it 
>available for downloading. We've also got a script that does the 
>same kind of thing for Manila site hierarchy XML structures, if 
>people are interested in that. That one probably needs some polish, 
>but it does work.
>
>-Brian




More information about the Frontier-Users mailing list