entimp
06-15-2003, 11:14 PM
Intro - Pt 2 (http://www.htmlforums.com/all-around-tutorials/t-ssi-server-side-includes-tutorial-pt-2-the-ssi-25616.html) - Pt3 (http://www.htmlforums.com/all-around-tutorials/t-ssi-server-side-includes-tutorial-pt-3-the-code-for-our-example-25644.html) - Pt4 (http://www.htmlforums.com/all-around-tutorials/t-ssi-server-side-includes-tutorial-pt-4-save-the-code-30534.html) - Pt5 (http://www.htmlforums.com/all-around-tutorials/t-ssi-server-side-includes-tutorial-pt-5-yay-it-is-all-over-30535.html)
Navigation for this tutorial is now in my signiture below.
In response to a few direct requests for help regarding this issue and some that could be solved with the use of Server Side Includes I have decided to put together a basic tutorial.
Writing this is my free time at work I am going to try and break it up into two or three workable units. I will respond to comments and work on them where I see fit (don't complain about spelling though as you have a dyslexic teacher). This should make it easier for a complete novice to consume and also for me to write. I will add to this thread as an edit, unless it wont fit in the max message length.
1.0 Introduction
"Server Side Include/s" will be written in short as SSI for the rest of this tutorial.
It doesn't matter if you are a HTML pro moving on to XHTML or a complete newbie to writing pages for the internet. The uses of SSI are many fold and work wonders for dynamic or static pages. For the purposes of this tutorial I will be dealing with static pages only. If you want to progress onto dealing with SSI in dynamic pages then you will have to follow your own nose or persuade some other forum member to write a tutorial on one. This tutorial will be long enough without dealing with dynamic page content.
So what do you need? A working knowledge of HTML
How to link files through various levels of a given directory structure (ideally)
A server that will provide server side permissions. In this case ASP. I am writing this for ASP users simply as that is where my experiance resides. I am sure users of PHP will be able to pick the gist of this up and transfer the inherent contents to their choice of server side platform.To transfer this knowledge to you with some ease we are going to take a generic static web site and show how it could benefit from SSI.
We shall call this fictional website "Biology for Newbies".
Biology for Newbies is a web site that provide resources for students of... guess what... Biology. Although it can provide an awful lot of information in different content sections we are only going to give it 4 for the purposes of this tutorial.
These areas are: Famous Biologists, Biological Links, Journal Articles and Biological Photo Gallery.
The site has a typical layout. A header area for the site logo with a content area below that with navigation on the left and finally at the bottom a footer for other information.**********************************
* Header Area *
**********************************
* N * *
* A * *
* V * Content Area *
* * *
* A * *
* R * *
* E * *
* A * *
**********************************
* Footer Area *
**********************************
A link clicked in the navigation area would open in the content area. This could be done in 3 common ways. With an Iframe, a HTML frameset, or as a new HTML document with navigation, header and footer as well. The HTML might look something like this (non frame version):<html>
<head>
</head>
<body>
<table width="100%">
<tr>
<td colspan="2">Header Area</td>
</tr>
<tr>
<td width="25%">Navigation area</td>
<td width="75%">Content Area</td>
</tr>
<tr>
<td colspan="2">Footer Area</td>
</tr>
</table>
</body>
</html>This is obviously very simplified but it serves our purpose. Just pretend it has all the meta tags in there and all the content.
Frames are fine to an extent so why bother with SSI? Good question! Frames do have their problems such as search engines and dissability issues. If you want high listings in search engine results these days you have to have content. Some search engines still have issues with reading the framed content. As for writing the new content for individual HTM documents this is time consuming especially if you have to change the format of the page. If you want to give your site a new paint job it can be soul destroying in editing each individual document in your site. This is where SSI comes to your rescue.
The next step is to understand how to use an SSI and how it works.
Intro - Pt 2 (http://www.htmlforums.com/all-around-tutorials/t-ssi-server-side-includes-tutorial-pt-2-the-ssi-25616.html) - Pt3 (http://www.htmlforums.com/all-around-tutorials/t-ssi-server-side-includes-tutorial-pt-3-the-code-for-our-example-25644.html) - Pt4 (http://www.htmlforums.com/all-around-tutorials/t-ssi-server-side-includes-tutorial-pt-4-save-the-code-30534.html) - Pt5 (http://www.htmlforums.com/all-around-tutorials/t-ssi-server-side-includes-tutorial-pt-5-yay-it-is-all-over-30535.html)
Navigation for this tutorial is now in my signiture below.
In response to a few direct requests for help regarding this issue and some that could be solved with the use of Server Side Includes I have decided to put together a basic tutorial.
Writing this is my free time at work I am going to try and break it up into two or three workable units. I will respond to comments and work on them where I see fit (don't complain about spelling though as you have a dyslexic teacher). This should make it easier for a complete novice to consume and also for me to write. I will add to this thread as an edit, unless it wont fit in the max message length.
1.0 Introduction
"Server Side Include/s" will be written in short as SSI for the rest of this tutorial.
It doesn't matter if you are a HTML pro moving on to XHTML or a complete newbie to writing pages for the internet. The uses of SSI are many fold and work wonders for dynamic or static pages. For the purposes of this tutorial I will be dealing with static pages only. If you want to progress onto dealing with SSI in dynamic pages then you will have to follow your own nose or persuade some other forum member to write a tutorial on one. This tutorial will be long enough without dealing with dynamic page content.
So what do you need? A working knowledge of HTML
How to link files through various levels of a given directory structure (ideally)
A server that will provide server side permissions. In this case ASP. I am writing this for ASP users simply as that is where my experiance resides. I am sure users of PHP will be able to pick the gist of this up and transfer the inherent contents to their choice of server side platform.To transfer this knowledge to you with some ease we are going to take a generic static web site and show how it could benefit from SSI.
We shall call this fictional website "Biology for Newbies".
Biology for Newbies is a web site that provide resources for students of... guess what... Biology. Although it can provide an awful lot of information in different content sections we are only going to give it 4 for the purposes of this tutorial.
These areas are: Famous Biologists, Biological Links, Journal Articles and Biological Photo Gallery.
The site has a typical layout. A header area for the site logo with a content area below that with navigation on the left and finally at the bottom a footer for other information.**********************************
* Header Area *
**********************************
* N * *
* A * *
* V * Content Area *
* * *
* A * *
* R * *
* E * *
* A * *
**********************************
* Footer Area *
**********************************
A link clicked in the navigation area would open in the content area. This could be done in 3 common ways. With an Iframe, a HTML frameset, or as a new HTML document with navigation, header and footer as well. The HTML might look something like this (non frame version):<html>
<head>
</head>
<body>
<table width="100%">
<tr>
<td colspan="2">Header Area</td>
</tr>
<tr>
<td width="25%">Navigation area</td>
<td width="75%">Content Area</td>
</tr>
<tr>
<td colspan="2">Footer Area</td>
</tr>
</table>
</body>
</html>This is obviously very simplified but it serves our purpose. Just pretend it has all the meta tags in there and all the content.
Frames are fine to an extent so why bother with SSI? Good question! Frames do have their problems such as search engines and dissability issues. If you want high listings in search engine results these days you have to have content. Some search engines still have issues with reading the framed content. As for writing the new content for individual HTM documents this is time consuming especially if you have to change the format of the page. If you want to give your site a new paint job it can be soul destroying in editing each individual document in your site. This is where SSI comes to your rescue.
The next step is to understand how to use an SSI and how it works.
Intro - Pt 2 (http://www.htmlforums.com/all-around-tutorials/t-ssi-server-side-includes-tutorial-pt-2-the-ssi-25616.html) - Pt3 (http://www.htmlforums.com/all-around-tutorials/t-ssi-server-side-includes-tutorial-pt-3-the-code-for-our-example-25644.html) - Pt4 (http://www.htmlforums.com/all-around-tutorials/t-ssi-server-side-includes-tutorial-pt-4-save-the-code-30534.html) - Pt5 (http://www.htmlforums.com/all-around-tutorials/t-ssi-server-side-includes-tutorial-pt-5-yay-it-is-all-over-30535.html)