1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
=cut
TITLE=genmenu
DESCRIPTION=genmenu generates a menu from a description file
KEYWORDS=genmenu,menu
DOCTOP=index
DOCPREV=genindex
DOCNEXT=htmlpod
=pod
=head1 genmenu - generate a collapsing menu
=head2 Usage:
=exec ../genmenu -h 2>&1
=head2 Description:
C<genmenu> reads the menu description file and generates a vertical
menu-bar, collapsed according to which pagename you gave it. This
requires all the documentation to be rebuilt whenever you change the
menu definition, but avoids having to use JavaScript.
I couldn't find a simple stand-alone program that did this, so here you are.
It doesn't require remstats.
=head2 The Menu Definition File
The file has a simple format. Blank lines and lines beginning with '#'
are ignored. The other lines look like:
[tabs]pagename [page title]
The number of C<tabs> shows the level of sub-menus, making the definition
file easy to grasp at a glance. Note that the C<tabs> are actual tab characters.
The C<page title> (optional) is what shows up in the menu, while the
C<pagename> is used to make the URL to link to. If the page name is
C<xyz>, then a link to C<xyz.html> is produced. If the C<page title> is missing,
then the C<pagename> is used instead.
|