entimp
10-31-2003, 12:30 AM
Intro (http://www.htmlforums.com/all-around-tutorials/t-ssi-server-side-includes-tutorial-25590.html) - 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
Okie dokey... so we now have the includes we need. These are:
meta_and_header.asp
nav.asp
before_content.asp
after_content.asp
end_page.asp
You saved these to a folder called 'includes didn't you? No? Then go do it now!
Back? Good! Then let's make our fist web page that uses
SSI's. This will be an index page for the very simple
website we are creating.
Open your design tool of choice... notepad or dreamweaver
for example. Save this file as index.asp, remember the asp
extension or the server will not read it before it gets sent.
Now you have a blank doc, we need to add some includes. The
first one will be 'meta_and_header.asp, and then add the
rest. It will look like this:
<!--#include file = "includes/meta_and_header.asp" -->
<!--#include file = "includes/nav.asp" -->
<!--#include file = "includes/before_content.asp" -->
<!--#include file = "includes/after_content.asp" -->
<!--#include file = "includes/end_page.asp" -->
All things being equal, that I lead you down this strange
path correctly and you did as I said... the instructions
above saved as index.asp will render you a perfectly valid
web page. Without the content or footer areas being empty
that is.
That isn't good is it? Well it is to an extent. I now want
you save this file as my_template.asp so that when you add
content all you need do is refer to this file.
So back to index.asp, open it and some content of your
choice.
<!--#include file = "includes/meta_and_header.asp" -->
<!--#include file = "includes/nav.asp" -->
<!--#include file = "includes/before_content.asp" -->
Shock Horror the content goes here! You would have never
worked that out would you! You can add what ever you want,
plain text, or normal markup (html), even scripts.
<!--#include file = "includes/after_content.asp" -->
You can do the same here for the footer region...
alternativly you can create custom content, save it as an
ASP file and serve it as another include. This seems to be
awful lot of work for a simple page doesn't it... well hang
in there.
<!--#include file = "includes/end_page.asp" -->
Now create the files:
biologists.asp
links.asp
article.asp
gallery.asp
Add the content to the template you made and save it as one of the above. Remember your content can be saved as another include, and not just written into a template page. Remember when writing your links you are directing the anchor at one of the files above and not the individual include files. I hope that makes sense.
Now send all your files to your ASP enabled server, remember you cannot run these to test from your home computer. Once uploaded you should be able to test them.
I hope that gets you off and running and that if I have missed something crazy out you will roast me for it... politely of course.
It has been a while since I got round to wrapping this all up. It wasn't for Peg nagging me (in a polite and constructive way ;) ) like my mum would have I wouldn't have got my lazy finger out and got this out of the way.
So a big thank you Pegasus.
I will of course edit this as I go along to clear up any confusion I have may have put in your direction. This can only be done if you reply and point it out to me in the relavent thread.
So there ya go! Hope this kinda helps and puts a few of you on the path of more confusing and screwed up web design.
Intro (http://www.htmlforums.com/all-around-tutorials/t-ssi-server-side-includes-tutorial-25590.html) - 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
Okie dokey... so we now have the includes we need. These are:
meta_and_header.asp
nav.asp
before_content.asp
after_content.asp
end_page.asp
You saved these to a folder called 'includes didn't you? No? Then go do it now!
Back? Good! Then let's make our fist web page that uses
SSI's. This will be an index page for the very simple
website we are creating.
Open your design tool of choice... notepad or dreamweaver
for example. Save this file as index.asp, remember the asp
extension or the server will not read it before it gets sent.
Now you have a blank doc, we need to add some includes. The
first one will be 'meta_and_header.asp, and then add the
rest. It will look like this:
<!--#include file = "includes/meta_and_header.asp" -->
<!--#include file = "includes/nav.asp" -->
<!--#include file = "includes/before_content.asp" -->
<!--#include file = "includes/after_content.asp" -->
<!--#include file = "includes/end_page.asp" -->
All things being equal, that I lead you down this strange
path correctly and you did as I said... the instructions
above saved as index.asp will render you a perfectly valid
web page. Without the content or footer areas being empty
that is.
That isn't good is it? Well it is to an extent. I now want
you save this file as my_template.asp so that when you add
content all you need do is refer to this file.
So back to index.asp, open it and some content of your
choice.
<!--#include file = "includes/meta_and_header.asp" -->
<!--#include file = "includes/nav.asp" -->
<!--#include file = "includes/before_content.asp" -->
Shock Horror the content goes here! You would have never
worked that out would you! You can add what ever you want,
plain text, or normal markup (html), even scripts.
<!--#include file = "includes/after_content.asp" -->
You can do the same here for the footer region...
alternativly you can create custom content, save it as an
ASP file and serve it as another include. This seems to be
awful lot of work for a simple page doesn't it... well hang
in there.
<!--#include file = "includes/end_page.asp" -->
Now create the files:
biologists.asp
links.asp
article.asp
gallery.asp
Add the content to the template you made and save it as one of the above. Remember your content can be saved as another include, and not just written into a template page. Remember when writing your links you are directing the anchor at one of the files above and not the individual include files. I hope that makes sense.
Now send all your files to your ASP enabled server, remember you cannot run these to test from your home computer. Once uploaded you should be able to test them.
I hope that gets you off and running and that if I have missed something crazy out you will roast me for it... politely of course.
It has been a while since I got round to wrapping this all up. It wasn't for Peg nagging me (in a polite and constructive way ;) ) like my mum would have I wouldn't have got my lazy finger out and got this out of the way.
So a big thank you Pegasus.
I will of course edit this as I go along to clear up any confusion I have may have put in your direction. This can only be done if you reply and point it out to me in the relavent thread.
So there ya go! Hope this kinda helps and puts a few of you on the path of more confusing and screwed up web design.
Intro (http://www.htmlforums.com/all-around-tutorials/t-ssi-server-side-includes-tutorial-25590.html) - 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