Skip to main content
Inspiring
April 6, 2007
Question

Relative paths changed from the templates path

  • April 6, 2007
  • 4 replies
  • 347 views
I have just done some error checking and defragementation on my hard disk, since I have done this any new template based pages are having their dynamic image links change from relative such as img src:=" _images/<%=(rs_flbannerpic.Fields.Item("fld_flbannerimage").Value)%>" to a full path such as img src=" file:///C|/Inetpub/wwwroot/website/_images/<%=(rs_flbannerpic.Fields.Item("fld_flbannerimage").Value)%>"

GRRR!!

Why is it doing this now?

I am loosing the plot here, so any help is going to be greatly appreciated. Thanks

Mat
This topic has been closed for replies.

4 replies

Inspiring
June 16, 2007
> <td height="30" style="background-image: url(file:///C|/Documents and
> Settings/&tM/My Documents/CS3 Data/Projects/StM WorkArea/StM 2070615/StM
> Present/assets_206/menuback30.gif);background-repeat: no-repeat">

This can only happen if your site is not properly defined, and DW thinks the
image is OUTSIDE of the root folder for some reason.

What happens if you make that link a root relative one rather than a
document relative one?

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"iceDale" <webforumsuser@macromedia.com> wrote in message
news:f50af9$e3f$1@forums.macromedia.com...
> Hi All,
>
> I was able to update the protected code in file created from the template.
>
> In summary, I created a template containing line below:
>
> <td height="30" style="background-image:
> url(../assets_206/menuback30.gif);background-repeat: no-repeat">
>
> Then I created a file using the template above and after saving the file,
> the line of codes were altered to an absolute path (as in below):
>
> <td height="30" style="background-image: url(file:///C|/Documents and
> Settings/&tM/My Documents/CS3 Data/Projects/StM WorkArea/StM 2070615/StM
> Present/assets_206/menuback30.gif);background-repeat: no-repeat">
>
> although the other relative paths remain ok:
> Ex:
> ...
> <link href="../assets_206/sm20601.css" rel="stylesheet" type="text/css" />
> ...
> <img src="../assets_206/headerRd.jpg" width="750" height="135" border="0"
> usemap="#StMHistory" />
> ...
>
> If you go back and make 'dummy change' from the template code and
> re-save
> the template... Dw will asked you if you would like to update the codes to
> all
> the other files created from the same template... reply "Update"!
>
> When I re-open the file, the relative-path now matches the template
> exactly:
>
> <td height="30" style="background-image:
> url(../assets_206/menuback30.gif);background-repeat: no-repeat">
>
> My file has the option of 'Update page when template changes', but for
> files
> that doesn't have this option CHECKED -- wouldn't this become an issued?
>


Inspiring
June 25, 2007
God, this was a long time ago!

For me there was no wrong doing in the creation of the site or the template because the template and any child files linked to it were working fine before I did defraging etc of my hard disk. Something happened during that maintenance process. I never got to the bottom of why it did it, but I won't be doing it again. The only way i managed to resolve the process was to create a new blank page from the template and then overwrite the template with the new page. All of a sudden it started to work again.
Participant
June 16, 2007
Hi All,

I was able to update the protected code in file created from the template.

In summary, I created a template containing line below:

<td height="30" style="background-image: url(../assets_206/menuback30.gif);background-repeat: no-repeat">

Then I created a file using the template above and after saving the file,
the line of codes were altered to an absolute path (as in below):

<td height="30" style="background-image: url(file:///C|/Documents and Settings/&tM/My Documents/CS3 Data/Projects/StM WorkArea/StM 2070615/StM Present/assets_206/menuback30.gif);background-repeat: no-repeat">

although the other relative paths remain ok:
Ex:
...
<link href="../assets_206/sm20601.css" rel="stylesheet" type="text/css" />
...
<img src="../assets_206/headerRd.jpg" width="750" height="135" border="0" usemap="#StMHistory" />
...

If you go back and make 'dummy change' from the template code and re-save the template... Dw will asked you if you would like to update the codes to all the other files created from the same template... reply "Update"!

When I re-open the file, the relative-path now matches the template exactly:

<td height="30" style="background-image: url(../assets_206/menuback30.gif);background-repeat: no-repeat">

My file has the option of 'Update page when template changes', but for files that doesn't have this option CHECKED -- wouldn't this become an issued?
Inspiring
June 15, 2007
Show me the template page, please.


--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"iceDale" <webforumsuser@macromedia.com> wrote in message
news:f4tflo$pip$1@forums.macromedia.com...
> Hi matthew,
>
> It appears am in the same boat as you are... the template doesn't seem to
> recognize 'relative paths' other than hyperlinks of immediate HTML tags;
> for
> these tags the relative paths are left alone.
>
> I just made a template having 'url( ralative-path)' as a paramater:
> e.i. style="background-image: url( ralative-path)".
> Upon creating a new file using the template all the ralative-paths
> parameter located in the style= parameter are now absolute
> paths.
>
> Having the "Don't rewrite documents relative paths" CHECKED under
>
>
Site>Manage Site>Site Definition(Category=Templates)

> dialogue-box doesn't seem to help. The 'absolute path' name that CS3 Dw
> subtituted remains even after the file is saved.
>
> Have you found the fix or is this ongoing issue?
>
>
>


Participant
June 15, 2007
Hi matthew,

It appears am in the same boat as you are... the template doesn't seem to recognize 'relative paths' other than hyperlinks of immediate HTML tags; for these tags the relative paths are left alone.

I just made a template having 'url( ralative-path)' as a paramater: e.i. style="background-image: url( ralative-path)".
Upon creating a new file using the template all the ralative-paths parameter located in the style= parameter are now absolute paths.

Having the "Don't rewrite documents relative paths" CHECKED under

Site>Manage Site>Site Definition(Category=Templates)

dialogue-box doesn't seem to help. The 'absolute path' name that CS3 Dw subtituted remains even after the file is saved.

Have you found the fix or is this ongoing issue?