|
Creating a navigation system:
Updating/adding navigation to your site
By Mike Slocombe for Internet Magazine, May 2004
1. Doing it manually
If your site's in good ol'fashioned HTML, adding a navigation bar is simply a case of pasting it on the top of every single page.
If you're using HTML tables, keep the navigation in a separate table so it will load faster.
Most web authoring programs offer global search and replace tools, so that you can make site-wide changes easily, although you'll have to upload all the pages afterwards.
2. Server Side Includes (SSI)
Server Side Includes automatically add predefined chunks of code to your pages - so you if you need to change the navigation you only have to change the SSI file.
It's a fairly easy process, but comes with two caveats: it can slow down the pages and not all webhosts will let you use them.
Check out the tutorials at
Demystifying Server Side Includes
FAQ: SSI (Server Side Includes
Using Server-Side Includes
3. Be Dynamic
If your site is going to be a thousand page blockbuster, making site wide changes could soon become a time-consuming nightmare.
By building a database driven site, making changes to your navigation bar becomes an absolute breeze: simply change the template and every page will show the updated content.
More info:
Building a Database-Driven Web Site Using PHP and MySQL
Active Server Pages tutorial for beginners
|