by Line
Warning! This tutorials require basic knowledge of HTML coding.
All websites with more than one page need a link menu for surfing the pages. This is no problem when it comes to coding sites with a few pages, but with a Sim site with lots of links to downloads etc. you will need a simple way to put in all the links without having to go and change the coding of maybe 50 different pages. By using an SSI code, you need to just edit one file to change the link menu of as many pages you want. Here is how:
First, for this to work, your host/server must be able to handle SSI. Check with your host if it's supported, it usually says so on their website. Also, all files must be changed from .html to .shtml for this to work. Don't worry, it doesn't affect anything else.
Now, make a new shtml file. Say you want to make a main menu with links to home, downloads, links, etc. Call the file something like links.shtml. Mine looks like this:
<a href="index.shtml">Home</a><br><br>
<a href="about.shtml">About this site</a><br><br>
<a href="downloads.shtml">Downloads</a><br><br>
<a href="guides.shtml">Guides and tutorials</a><br><br>
<a href="policy.shtml">Policy</a><br><br>
<a href="contact.shtml">Contact</a><br><br>
<a href="links.shtml">Links</a>
Now, find out where in the layout you want to put your menu. I put linebreaks in mine, as you can see, so I have a horizontal menu. Use this code to get the HTML in your menu.shtml to show up on your page:
<!--#include virtual="menu.shtml" -->
Change menu.shtml to whatever you called your first file. This code must be placed where you want it to show up on the page.
And you're done! Wasn't that hard, was it? The links don't have to be in all text, you can put in images or whatever you want, as the SSI code just displays whatever you put in the menu file. You can also do this with several files, so you can put in as many different menus and links as you want.