seeking vertical navigation menu code

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!


I'm looking for a bolt-in PHP navigation menu package as follows:

  --pure PHP:  no JavaScript, etc.
  --PHP5 compatible
  --vertical menu, sub-leveling indicated by indentation
  --css format control, per-level, and to indicate current focus
  --arbitrary number of levels -- at least 5
  --menu auto-expands (explodes) below node-of-current focus, collapses
     below others at same level
  --text-only;  no graphics at all
  --menu data in a text file
  --easy to add/modify/remove menu data file entries
  --optional:  site-map generation capability
  --optional:  data flag that makes a leaf item invisible
  --use is free for non-commercial use, or very inexpensive

What I'm basically after is an analog of a printed book's table-of-contents,
with the addition of auto-expansion of the node-of-current-focus and
collapsing of others below the same level.  In case this isn't clear, here's
an example, with the current focus on Chapter 3:

   Chapter 1 Topic Fee
   Chapter 2 Topic Foo
         Section 1  Some Fum stuff
         Section 2  Some more Fum stuff
         Section 3  Yet More Fum Details
   Chapter 4  Topic Fie
   Chapter 5  Topic Foe

Some unique formatting identifies the current focus -- I'm using all-caps
here, which wouldn't be realistic in actual use. If the user now  clicks on
"Chapter 2" he/she will see something like:

   Chapter 1 Topic Fee
         Section 1  Some more Foo stuff
         Section 2  Still More Foo stuff
   Chapter 3  Topic Fum
   Chapter 4  Topic Fie
   Chapter 5  Topic Foe

More about "easy to add/modify/remove entries":    The underlying menu data
must be maintainable with a text editor, and the data structure should be
reasonable -- structural cues would be nice. (Some packages use XML or a
CSV-style method.)  My content should change quite a bit over time and I
don't want to be afraid to make corresponding menu changes for fear of
breaking it.

More about "data flag that makes a leaf item invisible": In some cases where
the terminal (leaf) entries are very numerous, I'd like the option to set a
flag in their entries that signals "never display this entry".  This seems
like the most sensible way of maintaining consistency and keeping menu size
within limits.

Background:  I'm a volunteer developing several public-service sites which
will be used primarily by older people, who I think need familiar, very
simple navigation and prefer minimal glitz.  There's only me doing the work,
almost no time for testing, so I need an approach that's most likely to work
on most modern browsers.

On one of my sites I've using the PEAR package HTML_menu,
( which comes close to meeting all my needs.
However, it stores menu data in nested arrays, which I find awkward to
maintain and treacherous:  one parenthesis too many or too few and
everything breaks.



remove 'zzz'

Site Timeline