|
SSI (Server Side Includes)
Most large websites contain many pages of content. Has it ever occured to
you how the webmasters are able to update every page's navigation bar without updating
each page manually? There are actually many solutions to this problem, and server sided
includes is just one option. Be sure to check out our PHP Includes page for information on
how to do this using PHP (i.e. the way we did it at Shadeslayer).
What exactly is a "server sided include"? Basically, it
"includes" a certain HTML file into the designated place on your page. Try out
the tutorial below to see what exactly does that mean. However, please check with your
host whether it supports SSI before trying the tutorial below - because if it doesn't,
your page simply will not work.
To begin with, change all your HTML files into SHTML files by changing the
extention. Usually .shtml or .shtm works fine.
Then in something like word pad, put in the text/HTML that you want added
onto your page (this is the section that appears on most sites, like the navigation or
title). Save it as either a .html or .txt file.
On your .shtml document, place the following code where you want the
text/html file to be "included":
<!--#include file="filename.extension" -->
For example, on the old sites that I made, we used nav.html control the
nav bar. Where we want the navigation bar, we simply put in:
<!--#include file="nav.html" -->
You can have as many codes as you want on the site (Muggle Pride used to
have around 6) to keep it organized. Have fun, and save your updating time for something
more worth the time.
|