I'm not sure if I fully understand what you want your navigation bar to do.
On my web site (which I would link, but I'm serving it off a 28.8kbps modem), I wrote a script to generate my header. Contained within the script is a hash of navigation links that I want to display. For example:
my %links = ( "1" => ['/channels.shtml', 'channels'],
"2" => ['/mp3s/', 'mp3s'],
"3" => ['/fortune.shtml', 'fortune']
);
Then, when I am generating the navigation links, I get the request URI ($ENV{'REQUEST_URI'}) and compare it to the values of the anonymous array in the hash. If the path is the same, I bold the link. For instance:
foreach(sort keys %links) {
if ($uri eq $links{$_}[0]) {
print "<STRONG><A HREF=\"$links{$_}[0]\">$links{$_}[1]
+</A></STRONG>";
}
else {
print "<A HREF=\"$links{$_}[0]\">$links{$_}[1]</A>";
}
print " | ";
}
Like I said, I don't know if this is what you wanted. |