Importing a Menu (Through SSI?)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Michael7
    New Member
    • Sep 2007
    • 47

    Importing a Menu (Through SSI?)

    Hi everyone,

    I hope I'm alright in posting this here, I searched and couldn't find any help with this, or even a hint as to where I can ask this.

    I'm new to SSI and all that . . . actually just heard of it today. I'm wanting to be able to import a menu so that I don't have to edit each page when I edit something on the menu.

    I heard of SSI and figured that would be best. So I looked up on it a bit, my server does support it, and the .htaccess file has been edited to enable it and such.

    However . . . How do I get it to import? I saw the code:
    Code:
    <!- #include file="filename.txt" ->
    should work, but nothing is happening. Is that the wrong code? Or is there other code that I need to put to make it work?

    I really appreciate the help with this, and apologize if this is the wrong area to ask it. I'm unsure where else to ask, and so figured I would ask here being that the code is being placed in an HTML page and such . . .

    Thank you in advance for the help!

    PS--the website is workmenforChris t.org. I know the code there needs a lot of work, but that's in the works. I'm trying to first see if I can get the sidebar menu and such working through SSI to start things off . . .


    ~Michael
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    The format of the HTML comment is
    Code:
    <!-- your text -->
    so your statement should be
    Code:
    <!-- #include file="filename.txt" -->
    Ronald

    Comment

    • Michael7
      New Member
      • Sep 2007
      • 47

      #3
      I thought so, that's another code I saw for it.

      But it's still not working for me. Nothing is showing up . . .

      Would it possibly help to post the contents of the .htaccess file to see if that is right? I tried putting in a code I read was what I needed, but that didn't work. Then I tried going about it by letting the server CP put in the code itself (my host has an option to actually create the file, and has boxes for options I want to use such as SSI, and it puts the code in there for me), but it still did not work. Then I put in BOTH codes and it did not work still. . . sheesh!

      Comment

      • Michael7
        New Member
        • Sep 2007
        • 47

        #4
        Well, I was told by my host that apparently ASP isn't supported by them, so I just used the

        Code:
        <?php include 'vars.php'; ?>
        Instead, and everything I was trying to import, was imported!

        The only thing is . . . It may have been just a one-time occurance, but when I first used a link imported, it took a bit longer to get to the linked page than usual. Would importing something like that do that? (I would assume it wouldn't affect load times for links, but I'm just wanting to know from someone who actually knows all this SSI stuff haha.)

        Thanks again!

        ~Michael

        Comment

        • ronverdonk
          Recognized Expert Specialist
          • Jul 2006
          • 4259

          #5
          Many times a server is configured for SSI by setting the extension of the embedding script to .SHTML, the most common extension configured to parse SSI by default.
          Is that also the case with your server? In that case any other extension will not work properly. If you don't know, find out from your SP.

          Anyway, I think that the PHP solution ts still the best.

          Ronald

          Comment

          • Michael7
            New Member
            • Sep 2007
            • 47

            #6
            Yeah, I'm not sure if that is the case of my own host. But I was pretty against the idea of having to change all the extentions to shtml . . . that would mean even more changing of links, an trouble with people who link to my site, and bookmark pages. At best I'd have to create a redirection, but still . . .

            But I agree, the php seems to be the easiest way . . . and the least problematic for my users . . . hopefully!

            Comment

            • ronverdonk
              Recognized Expert Specialist
              • Jul 2006
              • 4259

              #7
              Good luck with your script.

              Ronald

              Comment

              • Michael7
                New Member
                • Sep 2007
                • 47

                #8
                Thanks! :)

                Trying to sort through it all to learn just a bit of CSS period. Sheesh, all the info on it and everything, actually makes it harder to learn (at least for me personally)!

                But thanks again!

                Comment

                Working...