You are seeing this very light version of the page, as you are using an outdated
browser!
Onlinetools.org is done in XHTML 1.0 and supports CSS 2.0, please upgrade your
browser if you want a better version of this site.
Thank you, please help us developers keep up with the industry rather than patching our code for outdated applications.
line 1 defines all the entries of the navigation, make sure that these values match the actual filenames without extensions.
line 3 retrieves the name of the current site for comparison.
line 4 starts looping over all the entries.
line 6 compares the currently displayed page with the one of the list, and displays the highlighted name without underscores. Each word gets converted to start with an uppercase character (as defined in line 5).
lines 10-12 display a link for all the other sites of our list.
line 14 puts a pipe character ("|") in between the links, but not after the last one.
And that is it! As simple as that. If you now create a new page with the template, you simply add it to the list in line 1 and it will display throughout the whole site.
With a bit of skill and the right naming conventions you can also do a graphical rollover navigation with the same script.
Now, download this demo page and have a look at it.
Table of contents:
The navigation woe
How to gain flexibility
The page template.
The nav.php script
Download and known issues