Forum Moderators: mack

Message Too Old, No Replies

making an external navigation file

         

adproducts

3:11 pm on Mar 5, 2006 (gmt 0)

10+ Year Member



I understand that you can create an external navigation file that would allow you to make a change to one file and then all of the pages referencing that file for the navigation menu would update. can anyone give me some guidence on how to do this? I have heard it called an "include" file and I think that making it an external file is important for SEO.

thanks in advance for your help.

petermason

12:48 pm on Mar 6, 2006 (gmt 0)

10+ Year Member



They are indeed called include files and can save you a lot of time - particularly on larger sites.

How best to do them depends on your server setup - whether it's got php or asp installed etc. I've never actually done it myself, but there are basically 3 ways to do it, that I know of:

Server Side Include (SSI) this is used on pages with the shtml extension. I'm afraid I have no idea how this works, but google it and you're sure to find tutorials.

php include - the simplest if you have php on your hosting, and it's very easy - you don't really need to know much php to do it.

asp include - same as above but for asp.

w3schools has tutorials on these, and some searching will undoubtedly reveal other advice.

LessZoa

1:05 am on Mar 7, 2006 (gmt 0)

10+ Year Member



You can also use includes with java (jsp) websites... but you have to know java :)

Basically you have a template which has instructions to "pull" various parts of a "master" page together.

And there is also the more advanced velocity template structure and all that stuff where you don't even see page extensions, but java commands like "product.do" and "product.get" in the url.

It all depends on the level of security you want on your site.

jfodale

2:56 pm on Mar 7, 2006 (gmt 0)

10+ Year Member



I'm using JS, SSI, and PHP includes on multiple pages of my site. If you still need it, here's how you can do SSI. Just stick this in your code and rename your files to have .shtml extension.

<!--#include file="header.shtml"-->