It depends on what language you're using. For example, in ColdFusion I just create one header file and use on any/all of my pages. Whatever I change in that one file will be changed on all of the pages that use it.
Hope This Helps!
Ecobb
Beer Consumption Analyst
"My work is a game, a very serious game." - M.C. Escher
An included file has the advantage of allowing you to easily make sitewide changes simply by editing that one file.
The exact way in which the menu operates is up to you. It could be a simple list of links, some images or a combination of CSS and list elements to create dropdown/popup/slideout menus. The world is your lobster.
Creating a menu as a flash file means you are still using an included file. However you are relying on the user having the appropriate plugin to navigate your site. Bear in mind that search engine crawlers (as a rule) don't have the ability to read the flash file and follow its links. To my mind, Flash is a "no no" in this case.
So, can you direct me anywhere to have a look at a tutorial? Does an included file also mean a java based menu with a "contents.js" style file? What makes it a server side included file? (i'm a design noob)
That's the menu code in isolation. It's just XHTML, nothing more special.
(I broke my own rule there and gave it a .inc extension. You are better off using .html really, though it's not important here)
I am using PHP to include the file so on each page in my site I have this where the menu would be:
Code:
<?php
include("navMenu.inc");
?>
That's it.
When my webserver gets a request for a page on my site, it reads the PHP and assembles the page, including the navigation file, then sends the resulting HTML back to the user's browser.
This means that if I add or remove a page I can simply edit that one file (navMenu.inc) and the new navigation is applied to every page in the site.
Regarding Java and JavaScript.
1. Be under no illusion, they are TOTALLY different things.
Java is a full blown programming language that is suited (supposedly) to web applications as it is very compact and highly portable/platform independent.
JavaScript, is a browser scripting language that doesn't really bear any relation to Java. It can be used on a web page to control things on the USER side. Therefore, if it is disabled on a user's browser anything you do with JavaScript will not work.
For that reason (same as with Flash really), I would not use JavaScript alone to create a navigation system. There must always be a way to navigate the site if JavaScript is turned off.
If you're looking for tutorials on SSI, take a look at the FAQs on this forum - the first two deal with SSI and related resources. Dunno about php, but it looks pretty straightforward from foamcow's example.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.