Navgen
Description
Navgen is a very simple little cgi script that automatically adds <link rel="">
navigational links
into the headers of your pages to make the Site Navigation Bar feature of
Mozilla and Opera browsers, using just a simple SSI call, which will let a user
quickly navigate through your website.In it's current form it's a bit rough and ready, but it works (you can see it in action on grapefruitopia.com if you've got the navigation bar turned on in Mozilla or Opera.
Requirements
Has currently only been tested on an Apache server running on Linux.
Installation
unzip the archive, and copy the navgen.lib and navgen.cgi files to your cgi folder (and make sure the navgen.cgi file is set to executable)Next make a text file (call it map.txt or anything you fancy) and enter the pages in the order that you want the navigation to work
example:
/index.shtml /somepage.shtml /someotherpage.shtml /dir1/index.shtml /dir1/anotherpage.shtml /dir2/index.shtml /dir2/subdir/index.shtml /lastpage.shtml |
Below this is the pagehash which includes extra pages that can be listed in the navigation bar (such as search and copyright pages - uncomment any you want to use and fill in the page details)
# mapfile is the text file containing the list of all the pages
# one per line, in the order in which you want the navigation
# to operate
my $mapfile = "/home/website/map.txt";
# add any extra navigation pages to the following hash
# uncomment a line and set your own page address to use
my %pagehash = (
"search" => "/search.shtml",
"author" => "/copyright.shtml",
"help" => "/help.shtml",
"home" => "http://your.home.page",
"bookmark" => "/someinterestingpage.shtml",
);
|
Including in your pages
Now you need to edit the html of each of your pages in the map, and include navgen, by adding a line like this:
<html><head><title>Your Website</title> <!--#exec cgi="/cgi-bin/navgen.cgi"--> </head> |
And that should be it!
If you want to use it from within your own cgi pages, then just include the navgen.lib file and call the NavGen() subroutine.
Download
Download navgen.tgz v1.0 - 16/07/04

