Welcome to TalkGraphics.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2006
    Posts
    2

    Default SSI appears in one page, not another

    In the home stretch on my web page, I find that the SSI "call" tag that summons up the navbar in my index.shtml file does not work in a different file ("Advising1"). The navbar (in a file called "navigation.html") is in the same (top) directlry as index.shtml. However, when I put "Advising1" in the same directory as the index and navigation files, the navbar appears just fine in Advising1. I thought that putting "virtual" in the SSI tag allowed the "calling" file to find the "called" file in any of the folders on the web site, but I guess I was wrong. So:

    How do you correctly write the SSI tag so that a file may call an SSI file from another folder or directory?

    Here is the mockup of the web page: (click on Advising -> English Advising):

    http://s87217786.onlinehome.us/Englishx/
    As always, thank you in advance.

  2. #2
    Join Date
    Apr 2006
    Location
    Texarkana, Texas USA
    Posts
    1

    Smile Re: SSI appears in one page, not another

    There are too many things we don’t know about your system to give a definitive answer, so I will proceed with a general reply.

    For Server Side Includes (SSI) to work correctly you must be using an Apache Web Server on a Unix (Linux) box. Once your web host has Apache installed one of two parameters for the server must be set; the server reads all web documents as SSI, or you are required to save all web documents having SSI with the “.shtml” extension.

    Most professional web servers using Apache will require you to save any web documents containing SSI with the .shtml extension, this saves the server a lot of processing time by directing it to only look at .shtml files for processing the “Included files into the web document.

    The next problem is the file type for the SSI file, this should be a text file ending with the “.txt” extension. The SSI file is not a HTML document and should have no HTML headers.

    In order to make your home page fully accessible to the search engine spyders and to allow all web browsers to use their default rendering applications save your home page as “index.html”. Your navigation panel should be created with a standard table. Your remaining pages; those with SSI will be saved with the “.shtml” extension.

    For your remaining web pages with a navigation panel perform the following tasks:
    1. With a real good text editor open your index.html file and copy the table containing the navigation panel. Copy everything from the <Table> to </Table> tags. This is the navigation panel only. Paste the copied code into a new text document and save it as nav.txt.

    2. The file nav.txt is now your SSI file to reference in all your remaining web documents having a navigation panel. When you need to add, modify, or delete an item in the navigation panel you only need to modify two files, your index.html file and the nav.txt file.

    The correct SSI tag to use is:

    <!--#include file="nav.txt" -->

    On the pages where you want to insert the navigation panel insert the above snippet.

    If you have several web documents in subdirectories place the nav.txt file in your root directory, then in the subdirectory web documents insert the path backwards to your root directory. Example: If you are one level down from your root insert ../nav.txt


    Michael

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •