Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: Selectively coloring a menu's item members

by hacker (Priest)
on Sep 03, 2007 at 01:40 UTC ( #636658=note: print w/replies, xml ) Need Help??

in reply to Selectively coloring a menu's item members

The code works so far, but I've discovered a problem..

If you select docs on the test website, you'll see that the menu properly tabs itself and colorizes itself based on the item you select.

The other 3 tabs that colorize this way are 'download', 'users' and 'developers'. Those work as well.

The problem I've noticed, happens when you select a second-level citizen from the secondary menu. For example, if you click on docs and then click on faq from there, the relationship to 'docs' is no longer maintained, and you lose the purple "tab" that goes to 'docs'.

The first-level menu is generated dynamically, using an array and checking $action (coming out of my dispatch table) against the items in that array, and applying the appropriate css style inline for that element only.

This is how the first-level citizens works right now, and you can see that it does indeed work.

What I'm trying to figure out, is how to create/maintain a relationship between the second-level citizens and their parent dispatch actions.

This means the child=>parent relationship looks like this:

home: donate: news: docs......: [faq] [lists] [tour] [documentation] download..: [windows] [macosx] [linux] [source] bugs: gallery: samples: users.....: [irc] [links] developers: [snapshots] [source] [tools] about:

What is the easiest/most flexible way of creating these menus in a way that maintains these relationships and allows me to keep the parent menu's tab colored, when I'm selecting children items of that parent?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://636658]
[Marshall]: stevieb wish you well with water problems, my water was off all day Monday for repairs. Any more progress on .exe info problem?.
[stevieb]: Marshall: no. I commented on the thread yesterday. Visual Studio updates the tags ok, but corrupts the exe
[stevieb]: I advised the OP that a possible workaround would be to add a version function/flag that displays the required copyright/license info instead
[Marshall]: Darn! I'll look at the thread. Must not be updatinga byte count somewhere. The .exe format is a complex critter.
[stevieb]: that way, it's still "hard coded" into the exe at least, despite not being visible via Properties
[Marshall]: I also looked into PerlApp from Active State, but they don't sell their Dev Kit independent of a very expensive ($1,200) per year license anymore.
[Corion]: I would assume that the PE format hasn't changed that much since the days of yore, but it seems that I would be wrong in that assumption
[Marshall]: When I bought my copy 15+ years ago, it was just a couple hundred bucks.

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (11)
As of 2016-12-08 18:16 GMT
Find Nodes?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:

    Results (144 votes). Check out past polls.