How to make site root-relative links work in DW and Server both?
oasis design Dec 11, 2013 9:31 AMSee details on buggy DW image link behavior, below. My question is:
1) how to make site root-relative links work in DW and Server both? Or…
2) how to reliably automate the change of several hundred legacy root-relative links of the form
/images/image.jpg to document-relative?
That is, to
../images/image.jpg or
../../images/image.jpg or
../../../images/image.jpg etc…depending on where the directory is.
The old format (/images/image.jpg ) used to work fine in my previous DW 8 configuration but appear grey in DW after “upgrading” to DW cs5.5 mac. (they look fine on the server, but it’s hard to edit image-heavy pages locally when they are all grey).
I tried changing the files to how DW creates root relative links now:
/public_html/images/image.jpg, which is a very easy, attractive root flow since there’s a one-to-one mapping. These look great in DW but are broken on the server!
I looked at the “advanced” site setup, and it looked like it might be possible to nuke the /public_html/ part of my server info…but it also looked like there was the potential for doing damage changing these settings, which are automatically generated from our server connection settings, which seem to work.
The “links relative to document/ site root” toggle…does that change how DW interprets existing links, or just change the default when you are adding a link? I have made 80% of the file links document relative…before wondering if root-relative isn’t better?
It sure seems less ambiguous for all those images if theres a way to make root relative work for DW design view, DW link check, and server.
Summary of buggy behavior: (see test with images here)
"old style" site root link
/images/img_book/WScover120x150_NEW.jpg
Design veiw in DW: broken (grey w/ broken icon)
Link check in DW: "external link" (i.e., uncheckable, + file could appear orphaned)
Browser: good
Ease of switching: n/a (existing format)
"new style" site root relative link
/public_html/images/img_book/WScover120x150_NEW.jpg
Design veiw in DW: good
Link check in DW: good
Browser: broken
Ease of switching: easy
Document relative link
../../images/img_book/WScover120x150_NEW.jpg
Design veiw in DW: good
Link check in DW: good
Browser: good
Ease of switching: hard (how to automate?)
Absolute link
http://www.oasisdesign.net/images/img_book/WScover120x150_NEW.jpg
Design veiw in DW: broken (grey w/ broken icon)
Link check in DW: external (i.e., uncheckable, + file could appear orphaned)
Browser: good
Ease of switching: n/a...not a real option
Thanks!




