Archive of UserLand's first discussion group, started October 5, 1998.

Re: NavBar macro - multiple level

Author:David Glenn
Posted:5/25/1999; 2:26:16 PM
Topic:NavBar macro - multiple level
Msg #:6680 (In response to 6658)
Prev/Next:6679 / 6681

Ok, I found a simple way to do this. It however does not know how to make the current page not linked.

Use the following script as an outline renderer (#renderOutlineWith "") and make an outline for the navigation.

Outline:
#renderOutlineWith "metrisSiteOutliner"
{glossSub("Metris Web Projects","development")}
	{glossSub("Metris Web Projects: News","news")}
	{glossSub("Metris Web Projects: Research","research")}
	{glossSub("Metris Web Projects: Internet","internet")}
		{glossSub("Metris Web Projects: Internet: MetrisCompanies.com","metriscompanies.com")}
		{glossSub("Metris Web Projects: Internet: eDirectAlert.com","edirectalert.com")}
	{glossSub("Metris Web Projects: Intranet","intranet")}

Script: on metrisSiteOutliner (adroutline) { «special metris Site Outliner for multi-level navigation bars «indent levels follow outline indent levels «there are no extra lines between links local (level = 0); op.firstsummit (); op.fullexpand (); on visit () { local (levelcount = 0); loop { local (s = op.getlinetext ()); s = spacePixels (8 * level, "horizontal") + s; op.setlinetext (s); if op.go (right, 1) { «cursor has subheads level++; visit (); level--; op.go (left, 1)}; if not op.go (down, 1) { break}}}; visit (); local (s = html.getOutlineHtml (adroutline, "", "", "", "
", "true")); return (s)}

dave





This page was archived on 6/13/2001; 4:50:25 PM.

© Copyright 1998-2001 UserLand Software, Inc.