Hiee!
This is how I’m understanding SSI:
1. I read that if I want specific html to display on a page I have to take that html and put it into a .txt file.
Then I insert that .txt file in my SSI call. Here’s an example:
<!--#include file="myfile.txt" --> or <!--#include file="myfile.html" -->
As you can see the second example above has an .html extension. I read you should only use .txt files within SSI calls, but some people use .html files. I couldn’t find the reason why. Does anyone know?
2. All of my websites pages use the same images (menu, header, footer, border).
However, some of my images have links on them and roll-over effects etc.
For example:
My Menu consists of several images. I understand that I can put all of my menu’s code and insert it in a .txt file and call it with an SSI command in all of my pages, but…
…what if some of the images on my Menu need code that’s in the < head > tag to function properly?
I know I don’t include the < html > < head > < title > and < body > tags in my .txt docs.
So, this is what I’m thinking…
I just insert the code for my menu in a .txt file (regardless of how many images and functions it has) and I leave the < head > code in the < head > tag of each pages original document (not the .txt doc).
This way when the SSI command calls the .txt file then the menu will function correctly because the html from that .txt file will be inserted into the html page, now that the html is part of the page it will then look for the < head > tags code in the original document.
Wooo. Am I right?
==================================
Yahve, you wrote…
to include files in your html pages using ssi just do:[/b]
<!-- #include file="relative_path/filename" -->
Do I have to use include file? I read about something called Include Virtual.
Include Virtual
If you wish to place an .shtml file in one directory and have it call a header.txt file or any file in another directory, use the include virtual= command to accomplish this. The syntax is <!--#include virtual="/header.txt" -->. Note that there is now a slash before the /header.txt file name this is calling the header.txt file in the user's home directory from any other directory.
Have you heard of this before? Can I use the virtual method if my .txt files are in the same directory as my html files?
==================================
Kactus, you wrote,
Have you considered using Frames?
I’ve very familiar with frames and have tested them on my site. They don’t suit it well.
Does 'my hosts server' mean that you've got a third-party supplying you with web services?
Yes, I have a host and everything is going well with them!!
My fingers are going to fall off.
Thanks so much!
Jenny