[pmwiki-users] Nested Menus to 3 Levels & Styles

Matt Simpson matthew at undertheoak.net
Mon Mar 20 11:49:11 CST 2006

I have a situation where I have an nested expanding menus. Items in menus go 3 levels deep and render differently (style sheet classes) depending on whether they are visible, or active, or what level they are on.

Here is this portion from the original web template that I'm trying to emulate within PmWiki...

<div id="left-nav">

<div class="top-level"><a id="site-home" href="http://homelink/url/">Home link</a></div>

<div class="top-level"><a class="open" href="http://item1/url">Item 1 in Nav</a></div>

<div class="second-level"><a class="open" href="http://item1.1/url">Item 1.1</a></div>

<div class="third-level"><a class="active" href="http://item1.1.1/url">Item 1.1.1</a></div>

<div class="top-level"><a href="http://item2.url">Item 2 in Nav</a></div>


Class within div is used to indent the items on the menu. The values are "top-level" "second-level" and "third-level." Let's call this LEVEL.

The class within the a href is either a) not present, b) "open", or c) "active". These correspond to treatment by the css for background, highlighting, font, etc. Let's call this STATE.

I also need an ability to show or not show an item, something akin to Cookbook/ExpandingMenus. Let's call this SHOW.

(LEVEL | class="top-level", class="second-level", class="third-level")

(STATE | null (empty), class="open", class="active")

(SHOW | process this item, do not process/show this item)

So, I'm hacking at the template. I'm not a programmer. I'm starting to read about conditional variables and markup variables and anything else I can find.... At this rate, I'll probably figure this out in aother 2 to 4 weeks. Can anyone here help? Does anyone have an idea about what I should do to enable this? How should I set this up?

It seems Cookbook/ExpandingMenus could help if I was only trying to go 2 levels deep. I would need some additional level of grouping for third-level items within a second-level.

Thanks in advance to anyone who can help.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users/attachments/20060320/d5325cd2/attachment.html 

More information about the pmwiki-users mailing list