locked
DWT Website holding absolute links when published RRS feed

  • Question

  • So, I've got the "new and improved" website ready to rock and roll.  I started with a website, then a dwt, then created all my html pages attached to the dwt.  In my code when I inserted all of my hyperlinks they came in as absolute links and when I renamed the folder as a test it - indeed - updated all the links. (yes, use hidden metadata files is enabled)

    I then went on to the publishing portion using FTP.  I recalculated the hyperlinks, went to remote website view and published the site.  However, EW has maintained all the absolute links!  Was I supposed to do a "replace" on all the absolute links and change them to relative links manually prior to publishing?  If so, wouldn't that mess up .dwt relationships?

    How do I get EW local to be absolute and my EW remote to be relative?  Also, I published my dwt file and simply "hid from view" on the server... do I even need to publish the .dwt file???   Thanks for ANY help you can provide!

    www.houstonmoveinfo.com

    EW Newbie

    • Edited by EWNewbie Thursday, September 25, 2008 4:14 AM
    Thursday, September 25, 2008 3:51 AM

Answers

  • I think you've run into this problem because of the "site" concept.
    If you always work from within a "site" this won't be an issue.
    In Expression Web click File/ Open site, then open the containing folder of your DWT.
    If EW doesn't open it as a site, right click the folder in your folders list pane and click "convert to site".
    double click the site to open it in EW.
    Once in click Site/ Site settings, and then make sure the "use metadata" checkbox is checked.
    at this point you may have to remedy the links in your DWT but at least they'll stick.
    also, it sounds to me like creating a sperate site is a lot of work for your situation, maybe you should consider developing the DWT within the parent site or web of the existing website.

    HTH
    Chris
    Thursday, September 25, 2008 1:02 PM
  • I feel your pain!
    Global find and replace is always helpful in a situation like this.
    Chris Leeds, MVP (Office-FrontPage)
    Thursday, September 25, 2008 2:21 PM

All replies

  • I guess it's lame to reply to your own message but I wanted to add some more info as I've been searching the forum and found a few more pieces of information.

    1)  When I created the new website I stored it on a local drive and just picked a spot...is there some special directory it's supposed to go in?
    2)  I inserted my hyperlinks using the menus and the menus inserted the absolute filepath.  i thought this was OK because I figured EW needs it to resolve any changes in the folder/file locations but one of the posts said that it should still be a relative link!  Why did EW put it in as an absolute reference?
    3)  I can easily fix all this by simply replacing the file path (all the files are in one folder) but it would be great to have a fix so I can get it right.

    Thanks.

    EW Newbie
    Thursday, September 25, 2008 4:12 AM
  • I think you've run into this problem because of the "site" concept.
    If you always work from within a "site" this won't be an issue.
    In Expression Web click File/ Open site, then open the containing folder of your DWT.
    If EW doesn't open it as a site, right click the folder in your folders list pane and click "convert to site".
    double click the site to open it in EW.
    Once in click Site/ Site settings, and then make sure the "use metadata" checkbox is checked.
    at this point you may have to remedy the links in your DWT but at least they'll stick.
    also, it sounds to me like creating a sperate site is a lot of work for your situation, maybe you should consider developing the DWT within the parent site or web of the existing website.

    HTH
    Chris
    Thursday, September 25, 2008 1:02 PM
  • Hi Chris,

    Thanks for the reply!  I originally had a big grouping of loose pages that referred to my CSS and this caused me problems.  So, I did the following:

    1. Created a DWT and attached all the pages
    2. Cleaned up the content in each of the editable and non-editable regions (some of it doubled up when I attached the dwt to the page)
    However, after that, everytime I would click my relative links, EW would actually go retrieve the remote webpage instead of the local one on my hard drive.  So then I did the following (started from point A):

    1. Did a New>Website from EW
    2. New>blank DWT
    3. Used notepad to open my old files and cut and paste in the "non-editable content"
    4. The hyperlinks were still relative so I inserted a couple hyperlinks and observed that all EW was doing was putting the file path in the source (and it was C:// yada yada btw)
    5. Did the old Ctrl C, Ctrl V to update all the hyperlinks rather than use the shortcut menu because it was faster
    6. Then I did a New>Page for all my pages and copied in the editable content from each page opened in Notepad
    7. Updated the links in the editable content for the indiviual pages just as before (as C: yada yada)
    8. Finally, I changed the folder name for the website to see if EW would update all the hyperlinks and it did it successfully.
    9. When I published the site I recalced the links first and then published and it held all the absolute paths (as I mentioned above)
    To try and fix it I've done the following:
    1. Opened EW and went to file>open>website and clicked on the folder where my website is located and EW opened it up (it didn't prompt me that "no site exists")
    2. Made sure the hidden metadata files box was checked (it was from the beginning btw)

    The only thing I'm left with is to basically do a "replace" on all my links and change them back to relative references manually.  My fear is that EW will - once again - try and open the remote webpage instead of the local one again and unfortunately, after I do that "replace" there's no easy way back except to cut and paste the filepath in on every single link!!

    Aaaahhh!

    EW Newbie

    Thursday, September 25, 2008 2:00 PM
  • I feel your pain!
    Global find and replace is always helpful in a situation like this.
    Chris Leeds, MVP (Office-FrontPage)
    Thursday, September 25, 2008 2:21 PM