Page is a not externally linkable
rocknbil - 3:52 pm on Nov 4, 2011 (gmt 0)
Since your question was answered via PHP in the PHP forum, if you don't want to do all your files in PHP, it's still easy with SSI's (Server Side Includes.) This "old school" technology is exactly what this is for, IMO there's no reason to involve a robust programming language (PHP) when SSI's will do - it's the right tool for the job.
Drop this into an .htaccess file in the root of your domain (Linux based, you can do it on Windows servers too but it's a lot different)
AddHandler server-parsed .html
Normally only .shtml files are parsed for SSI's, but that directive will parse .html files now too - which used to be a "greedy" thing to do but is rarely a problem with today's servers.
Now, anywhere you want the menu in plain old html files,
<!--#include virtual="/includes/navigation.txt" -->
The file can be anything - .txt., .html, doesn't matter.
If the file is in the the same directory as the including parent, you can use file instead of virtual - but virtual works for either case, and prevents a lot of dot-syntax ../../../ confusion. In the above example, it will start at the domain root, (leading "/") then look in the includes directory for the file navigation.txt.
There's even simple ways to set the "current page" as an active class.