SSI

Discussion in 'HTML' started by matty, Mar 14, 2006.

  1. matty

    matty Guest

    Hello, I have a simple question that is killing me. I have a site that
    displays content in three frames. A top frame which is the title of the
    page, a sidebar which is the menu, and the center is for content. I am
    currently using tables to display this content. I have in the past done
    this with ASP I believe but am not sure. I am looking for an eaiser way to
    display this content without using the frames tag or tables that need to be
    updated on every page. I basicly am looking for a template. For instance
    I only need to update the side bar menu once and it is propagated
    throughout the site. I am running this fram a Linux server w/ Apache. I
    looked at the Apache tut on their website at SSI but don't really know if
    this is what I want. I have tried creating a html file with the necessary
    code for the title and then I added <!--#include virtual="/footer.html"
    --!> to the page but it didn't work. Both files are in the same directory,
    I have already made sure that they see each other. Any thoughts on how to
    do this? Am I one the right path and it is a simple codeing error? If
    anyone has any links to good tutorials or the like I would be greatful.
    Thanks

    -Rules And Models Destroy Genuis And Art-
    -Caffiene is not a drug, its a food group-
    matty, Mar 14, 2006
    #1
    1. Advertising

  2. matty wrote:

    > Hello, I have a simple question that is killing me. I have a site that
    > displays content in three frames. A top frame which is the title of the
    > page, a sidebar which is the menu, and the center is for content. I am
    > currently using tables to display this content. I have in the past done
    > this with ASP I believe but am not sure. I am looking for an eaiser way
    > to display this content without using the frames tag or tables that need
    > to be
    > updated on every page. I basicly am looking for a template. For instance
    > I only need to update the side bar menu once and it is propagated
    > throughout the site. I am running this fram a Linux server w/ Apache. I
    > looked at the Apache tut on their website at SSI but don't really know if
    > this is what I want. I have tried creating a html file with the necessary
    > code for the title and then I added <!--#include virtual="/footer.html"
    > --!> to the page but it didn't work. Both files are in the same
    > directory,
    > I have already made sure that they see each other. Any thoughts on how to
    > do this? Am I one the right path and it is a simple codeing error? If
    > anyone has any links to good tutorials or the like I would be greatful.
    > Thanks
    >
    > -Rules And Models Destroy Genuis And Art-
    > -Caffiene is not a drug, its a food group-


    If the file is in the same directory, you would want to specify:
    <!--#include virtual="./footer.html"--> . The ./ refers to the current
    directory. / alone refers to the root directory. You might also be
    running into server issues, like SSI being disabled, or not configured
    appropriately for your usage. SSI may restricted to a specific directory.
    Those questions are better directed to your hosting company or to an apache
    related news group.

    But first of all, stick to the path you are on, and just fix the path. (A
    little geek humour!)

    Carolyn
    --
    Carolyn Marenger
    Carolyn Marenger, Mar 14, 2006
    #2
    1. Advertising

  3. matty

    Greg N. Guest

    matty wrote:

    > I have tried creating a html file with the necessary
    > code for the title and then I added <!--#include ...


    If SSI is supported at all on your server, chances are that it is
    configured to require your file type to be SHTML instead of HTML.

    --
    Gregor mit dem Motorrad auf Reisen:
    http://hothaus.de/greg-tour/
    Greg N., Mar 14, 2006
    #3
  4. matty

    matty Guest


    > If the file is in the same directory, you would want to specify:
    > <!--#include virtual="./footer.html"--> . The ./ refers to the current
    > directory. / alone refers to the root directory.


    Tried that, no luck. Thanks for the tip though.


    > You might also be > running into server issues, like SSI being disabled,

    or not configured appropriately for your usage. SSI may restricted to a
    specific directory. Those questions are better directed to your hosting
    company or to an apache related news group.

    My next step is to contact them to see what is enabled. Then ask an Apache
    group

    > But first of all, stick to the path you are on, and just fix the path. (A
    > little geek humour!)
    >
    > Carolyn


    Thanks for the help.

    --
    -Rules And Models Destroy Genuis And Art-
    -Caffiene is not a drug, its a food group-
    http://digitalstratosphere.net
    matty, Mar 14, 2006
    #4
  5. matty

    matty Guest

    Greg N. wrote:

    > matty wrote:
    >
    >> I have tried creating a html file with the necessary
    >> code for the title and then I added <!--#include ...

    >
    > If SSI is supported at all on your server, chances are that it is
    > configured to require your file type to be SHTML instead of HTML.
    >

    Tried that, no luck. Thanks for the tip though. I am going to contact my
    hosting company and see what is enabled and not. I amy be out on a limb
    here but is this something I can do with PHP? It is on my list of things
    to play with and this might be a good push for me to dig into it.


    --
    -Rules And Models Destroy Genuis And Art-
    -Caffiene is not a drug, its a food group-
    http://digitalstratosphere.net
    matty, Mar 14, 2006
    #5
  6. matty

    Stan McCann Guest

    "Greg N." <> wrote in news:dv798q$ql9$:

    > matty wrote:
    >
    >> I have tried creating a html file with the necessary
    >> code for the title and then I added <!--#include ...

    >
    > If SSI is supported at all on your server, chances are that it is
    > configured to require your file type to be SHTML instead of HTML.
    >


    Or may be configured using the XHackbit in which you must place the x
    bit on the file's attributes. I have several servers configuted like
    that. I didn't like the shtml option.

    --
    Stan McCann, "Uncle Pirate" http://stanmccann.us/
    Webmaster, NMSU at Alamogordo http://alamo.nmsu.edu/
    Now blocking Google Grouper posts and replies.
    http://blinkynet.net/comp/uip5.html
    Stan McCann, Mar 15, 2006
    #6
  7. matty

    Stan McCann Guest

    matty <> wrote in
    news:90GRf.11813$:

    > Greg N. wrote:
    >
    >> matty wrote:
    >>
    >>> I have tried creating a html file with the necessary
    >>> code for the title and then I added <!--#include ...

    >>
    >> If SSI is supported at all on your server, chances are that it is
    >> configured to require your file type to be SHTML instead of HTML.
    >>

    > Tried that, no luck. Thanks for the tip though. I am going to
    > contact my hosting company and see what is enabled and not. I amy
    > be out on a limb here but is this something I can do with PHP? It
    > is on my list of things to play with and this might be a good push
    > for me to dig into it.
    >
    >


    It uses different syntax, but yes, PHP will work too if installed.
    <!--#include ... becomes <?php include ("path/include.file"); ?> or if
    including files that may contain code that can't be redefined, use the
    include_once() function instead of include().

    --
    Stan McCann, "Uncle Pirate" http://stanmccann.us/
    Webmaster, NMSU at Alamogordo http://alamo.nmsu.edu/
    Now blocking Google Grouper posts and replies.
    http://blinkynet.net/comp/uip5.html
    Stan McCann, Mar 15, 2006
    #7
  8. matty

    JDS Guest

    On Tue, 14 Mar 2006 20:50:13 +0000, matty wrote:

    > I amy be out on a limb
    > here but is this something I can do with PHP?


    In a word, "YES"

    PHP is a far more flexible and powerful solution than SSI, which is why
    SSI is not used so much anymore. But to more completely answer, in PHP,
    the one-liner is:

    <?php include("footer.html"); ?>

    And to more completely complete answer, there are many ways to skin this
    cat. From simple header/footer includes to complicated content management
    systems (CMS), from build-your-own to install an existing system. If you
    need to do anything more complex than headre/footer, I recommend you just
    use someone else's already-available templating solution or CMS rather
    than buid your own. see http://www.opensourcecms.com, for example.

    later...

    --
    JDS | lid
    | http://www.newtnotes.com
    DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/
    JDS, Mar 15, 2006
    #8
  9. matty

    JDS Guest

    JDS, Mar 15, 2006
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. JJ

    Home-made SSI chips

    JJ, Sep 21, 2003, in forum: VHDL
    Replies:
    8
    Views:
    7,697
    james
    Sep 27, 2003
  2. Xanathos
    Replies:
    0
    Views:
    453
    Xanathos
    Feb 2, 2005
  3. Bernardo Heynemann

    SSI Equivalent

    Bernardo Heynemann, Dec 1, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    500
    Chris Jackson
    Dec 1, 2003
  4. Eranga Udesh

    Howto get the current file path with SSI

    Eranga Udesh, Apr 5, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    1,080
    Aaron Bertrand [MVP]
    Apr 6, 2004
  5. =?Utf-8?B?V2ViR3V5Qm9i?=

    SSI Hierarchy and Implementation

    =?Utf-8?B?V2ViR3V5Qm9i?=, Jun 8, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    395
    John Saunders
    Jun 8, 2004
Loading...

Share This Page