Skip navigation
Currently Being Moderated

Templates & SSI

Apr 6, 2009 10:30 AM

I am trying to use Server-Side Includes in a DW CS4 Template.  I am using SSI for the headers & footers in a master template, not within the editable regions.  There are several inner templates that includes this master template.  I'm using templates for Contribute users.

 

When displaying the Template itself in DW, it renders correctly, however, when I instantiate a page with the template, the images within the SSI code are rendered in DW as broken links.

 

The images in the SHTML file are <img src="../images/foo.jpg">  and the SSI files are in the root folder with the rest of the site's pages.  The Templates are in the usual Templates folder ("../Templates").

 

This all works fine when I don't use templates, just problematic when I do...

 

First, in DW, is there a way to expand the SSI code in code view to see what's going on there?

Second, does anyone have any insight into this issue?

 

Thanks!

 
Replies
  • Currently Being Moderated
    Apr 6, 2009 10:56 AM   in reply to GarryCT

    The images in the SHTML file are <img src="../images/foo.jpg">

     

    You should use site root relative paths inside of include files.

     

    Side note- they killed the NNTP for this?  Ten minutes and i've only read three messages. can't select and quote. and I can't see what i've read or not read.

     

    i'm gone.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 6, 2009 5:39 PM   in reply to GarryCT

    GarryCT wrote:

     

    The problem seems to be that I extracted the SHTML code from the template, which contains links relative to the Template folder, which is as expected.

    Change them to be root relative in the include file.  You *must* do this for it to work.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points