navigator.mc - JavaScript menu navigator

- NAME
- SYNOPSIS
- USAGE
- Parameters hash
- AUTHOR

# NAME

navigator.mc - JavaScript menu navigator

# SYNOPSIS

HTML::Mason component to implement JavaScript three-bar horizontal menu.

# USAGE

     <& /naviagtor.mc, parameters hash, ... &>

     Produces the following:

                 Description bar
     nav title:  <menu1>  menu2  menu3
                 submenu1   submenu2  submenu3

# Parameters hash

Each node of menu consists of hash of parameters.

     <& /navigator.mc, (navigator parameters),
          menu1 => { menu1 parameters},
          menu2 => { menu2 parameters},
          &>

- title
  The name of the menu or navigator itself.

- description
  Description text to place on description bar

- url
  URL for the menu or navigator. To add a parameter to URL use a string like #param# and add `param` parameter to the hash.

       <& /navigator.mc, ..., url => '/index.htm?object=#param#', ..., param => 15 &>
       produces
       /index.htm?object=15

- items
  Array ref of menu or submenu names. This parameter is not valid for submenu item.

       <& /navigator.mc, ..., items => ['menu1','menu2'],
             menu1 => {
                  title => '...',
                  url => 'somefile.htm?p=#param#',
                  description => 'menu description',
                  depend => ['param'],
                  items => ['submenu1', 'submenu2'],
               },
             param => $ARGS{param},
             menu2 => { parameters of menu2 },
             submenu1 => { parameters of submenu1 },
             submenu2 => { parameters of submenu2 },
             &>

- disabled
  Disable this menu item if true. Menu item 'xxx' is disabled if parameter named `xxx_disabled` is true.

       <& /navigator.mc, ..., items => ['menu1','menu2'],
            menu2_disabled => 1 &>

- depend
  Array ref of parameters names. Make this menu disabled if any of listed parameters is not true

       <& /navigator.mc, ..., items => ['menu1','menu2'],
            menu1 => { ..., depend => [param], ...},
            param => $ARGS{param},
        &>

# AUTHOR

Sergey Rusakov, <rusakov_sa@users.sourceforge.net>