Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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?


In reply to Re: Selectively coloring a menu's item members by hacker
in thread Selectively coloring a menu's item members by hacker

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2024-04-24 06:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found