Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jul 2005
    Posts
    120
    Thanks
    36
    Thanked 0 Times in 0 Posts

    SSI shtml navigation

    Hi,

    I’m taking a first stab at an SSI navigation file, which is not working for me. The shtml file, along with the file that points to it (link1.html) is attached. In “link1.html”, the SSI code is on Line 37. I referred to two different tutorials to learn how to set this up. One provided the code:

    Code:
    <!--#include virtual="MLtopnav.shtml"-->
    and the other tutorial said it should be:

    Code:
    <!--#include file="MLtopnav.shtml"-->
    Also, not covered by either of the tutorials was precisely what code should be contained in the .shtml file. My assumption was, only the code that gets inserted, i.e., no body tags, header tags or anything else.

    Here’s the page:

    http://www.freedommd.com/Freedom10/Link1.html

    It should look like this:

    http://www.freedommd.com/Freedom10/M...rTestPage.html

    This particular usage may be complicated further by the fact that this is a jquery navbar; I don’t know, but my thought was that as long as “link1.html” points to the correct nav .js files in the header tags (which it does), it should work. And our server is SSI enabled.

    Can anyone tell me what I’m doing wrong?

    Thanks,

    John
    Attached Files Attached Files

  • #2
    Regular Coder
    Join Date
    Jul 2005
    Posts
    120
    Thanks
    36
    Thanked 0 Times in 0 Posts
    Got my answer, thank you if you took the time to consider my problem. For anyone else's benefit, the solution was:

    The page that has the <!-- include file="whatever.htm" --> needs to have the .shtml extension, not the file you are including.

    The file you are including can have .htm, .html. .txt or something like those. I use .htm usually so if I open it in my text editor it gets syntax highlighting.

    You put exactly what you want to include in the include file. In the case of a nav like yours, you are probably talking about a div and a list, and nothing else, depending on how you setup the nav. You wouldn't need any of the head stuff in the include (html tag, head tag, dtd...none of that most likely in this case.


  •  

    Posting Permissions

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