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?
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.
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. When the template is instantiated, the links are adjusted, except for the SHTML file (which I placed in the root folder). I had to manually change the links in the SHTML file. Perhaps if I put the file in a subdirectly, I wouldn't have this issue. Haven't tried it, though.
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.
Europe, Middle East and Africa