Einstein500
12-22-2005, 08:21 PM
Includes are the way to go. The three most common methods are PHP, ASP and SSI (though SSI is rapidly losing popularity, in my observation).
The whole idea of an include is easy. You put a single line of code into every page, like this:
<?php include "path/include_file.inc";?>
And then you create an entirely separate document with the information you want to insert, in your case, navigation. Now, when you want to make a site-wide change, you change that one file, and the whole site updates.
You can take this a step farther by putting includes inside included files. I'll personally create subsection navigation for a site, put each subsection in its own include file, and call it into a page for displayed navigation, DHTML menus, the domain's site map, etc., all controlled from a single source. It saves a TON of time, and you can put together a really slick system!
I have seen this posted alot, but where exactly would you put it?..does it matter or can it be in any place of the coding? Also, about that separate document you create, how do you set it up? Like how would it link?...Thanks for your time.
Einstein
The whole idea of an include is easy. You put a single line of code into every page, like this:
<?php include "path/include_file.inc";?>
And then you create an entirely separate document with the information you want to insert, in your case, navigation. Now, when you want to make a site-wide change, you change that one file, and the whole site updates.
You can take this a step farther by putting includes inside included files. I'll personally create subsection navigation for a site, put each subsection in its own include file, and call it into a page for displayed navigation, DHTML menus, the domain's site map, etc., all controlled from a single source. It saves a TON of time, and you can put together a really slick system!
I have seen this posted alot, but where exactly would you put it?..does it matter or can it be in any place of the coding? Also, about that separate document you create, how do you set it up? Like how would it link?...Thanks for your time.
Einstein
