Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Relative paths changed from the templates path

Enthusiast ,
Apr 06, 2007 Apr 06, 2007

Copy link to clipboard

Copied

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
TOPICS
Server side applications

Views

316
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 15, 2007 Jun 15, 2007

Copy link to clipboard

Copied

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?

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 15, 2007 Jun 15, 2007

Copy link to clipboard

Copied

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?
>
>
>


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 16, 2007 Jun 16, 2007

Copy link to clipboard

Copied

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?

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 16, 2007 Jun 16, 2007

Copy link to clipboard

Copied

> <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?
>


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jun 25, 2007 Jun 25, 2007

Copy link to clipboard

Copied

LATEST
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.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines