Skip navigation
Currently Being Moderated

How to make paths recognize local site root?

Nov 7, 2008 11:12 AM

I don't use Dreamweaver a whole lot (mostly just a designer) but I thought for sure that Dreamweaver was able to recognize absolute paths? For some reason it's not working. I have a site set up and the "Local root folder" set to a location on my harddrive, but the images and CSS link only shows up in Dreamweaver if I use relative paths. For instance, if I use "img/enacct.gif" everything works fine, but if I use "/img/enacct.gif" I get a broken image. The Files panel shows the correct site root folder. What am I missing?
 
Replies
  • Currently Being Moderated
    Nov 7, 2008 12:25 PM   in reply to abeall
    when and where is it not working?

    On a guess- is it during an F12 Preview in Browser?

    If yes- go into dw preferences->Preview in Browser and checkmark "preview
    using temp files" so dw can make a temp page and convert the site root
    relative paths to document relative so they work off the hard drive.

    Otherwise, install a local testing server, and set up a virtual domain so
    that the site root relative paths will mean something-

    viewing a page directly from your hard drive, the /img/file.jpg path means
    "go to root level of the hard drive", not the defined root level of this web
    site.
    --
    Alan
    Adobe Community Expert, dreamweaver

    http://www.adobe.com/communities/experts/



     
    |
    Mark as:
  • Currently Being Moderated
    Nov 12, 2008 9:17 AM   in reply to abeall


    > Any ideas?

    Where and when are the images not showing up?

    In dw design view?

    In F12 preview in browser?

    Or on the live remote server?

    Is the site defined to the correct folder level so that site root relative
    paths are correct?

    URL address to actual page pls.

    code that doesn't work:

    what the code should be to work:


    --
    Alan
    Adobe Community Expert, dreamweaver

    http://www.adobe.com/communities/experts/



     
    |
    Mark as:
  • Currently Being Moderated
    Aug 16, 2009 10:07 AM   in reply to Newsgroup_User

    I have the same problem on multiple sites.  I use site root-based links (ex., /eller_styles.css or /includes/nav.htm), but while the paths are just fine -- and show up just fine in design mode in CS3 -- they are not working for images or style sheets in Dreamweaver CS4 either for me or for one of my clients.  This is clearly a CS4 problem.  Is there a way to reset site parameters or paths to fix?  I've had no luck so far and the problem has prompted me to stop using CS4 and return to CS3.  But my client doesn't have that opportunity.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 16, 2009 10:14 AM   in reply to Simmons Buntin

    By the way, for clarification this is in CS4 design mode (not preview in browser, etc.).  If the page is put to the remote server, it looks/works just fine.  But in design mode it's a mess -- unworkable, really:

     

    CS4_DesignView_Error.jpg

     

    So far this happens on PC running CS4 on Vista and Windows XP.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 16, 2009 10:31 AM   in reply to Simmons Buntin

    I did find this possible fix, but haven't had the chance to try it yet (and it doesn't seem to address images, which likewise aren't rendering in design view but the links are just fine:

     

    http://forums.adobe.com/thread/454034

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 16, 2009 10:58 AM   in reply to Simmons Buntin

    Well, my client just tried that and it didn't work (everything shows properly in Style Rendering as it should).  Now, the site shows in design mode on another computer (both running XP).  On my computer at work (Vista) this happened on a new site I created from an existing one that works just fine in CS4 design mode.  I duplicated the site using DW then edited to change source file locations, etc.  Again, every link is good: it all works online, but just not in design mode.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 7, 2010 7:40 PM   in reply to Simmons Buntin

    ********************************************************************** ******************

    ******************* PROBLEM FIXED  *********************************************

     

    This was certainly the oddest problem I have encountered although fairly easy to find a fix for. It only took me 6 hours to track it down. HA, Thanks Microsoft.

     

    This does appear to be a CS4 or Dreamweaver issue if you have not installed a site on your local machine before this. Who would have thought that IIS would not work entirely on install. Well MS is beginning to install less features upon install and of course those are the features you need most. Why on earth would you need CSS files to work.

     

    The problem is that Dreamwever does not have control over what MS and IIS does. The reference above referring to the check mark, Preview using temporary files is to Adobes credit, in allowing us to see the final result even if we dont trust what we see. Normally in the past, if you yourself have not made mistake in the link or code on your web page, it has been the application messing up the path in one way or another. I have seen funky things even though you have all the settings correct since ID4. (DW Inter Dev 4.) This is one time where it is not the applications fault.

     

    IIS does not instal the feature that allows you to use CSS style sheets.

     

    There is a fix both for Vista and Server 2008. I can not find the page again that tells of server 2008 but the link below states the fix for Vista.

     

    Basically you have to go to your control panel,

     

    Programs and Features

    on the right click on Turn Windows Features on or off..... wait for it to fill

    expand "Internet Information Services"

    expand "World Wide WEb Services"

    expand "Common Http Features"

    Put a check mark in Static content.

     

    Press ok and it will instal the capability for Cascading Style sheets to work on your local machine for your browsers.

     

    Ok I can not find my original MSDN Microsoft site but I can post this link here.

    http://gurustop.net/blog/2009/10/12/funny-problem-windows-7-iis-7-5-im ages-css-not-showing/

     

     

     

     

     

    ****************************ORIGINAL POST **************************************

    Design view in DW shows the CSS styles.

     

    with the temp files checked for browse in (tested with firefox and IE)

     

    HTM did not show the css styles

    ASP did show the css styles.

     

    With the temp files unchecked

     

    IIS shows a blank page for HTM

    IIS shows the text but no CSS Style settings.

     

    Near the top it says a fix for this is to install a web server, as noted I have IIS on a Vista Machine.

     

    This is on a Vista Machine and DW CS4.

     

    Going to the site via IE using my local IIS server I do not get the CSS viewable.

     

    Since making this post I have CS4 installed on an XP machine and the page previews and shows properly in XP local IIS. There is no problem at all in my pages at all in firefox and ie.I think this may be a Microsoft problem and we see this as a result in CS4 browse in feature. If IE does not show the page properly outside of DW I think DW problem is just that IIS is not working properly with any browser.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 11, 2013 2:21 PM   in reply to machrf

    Unfortunately, not solved for me. I have a similar problem. I can usually see the "Source Code" and js. .php and .css files associated with the file I am working on directly about the "Code", "Split", and "Design" buttons. However, for some reason I can only see the associated files if they have relative links. As soon as I place a "/" before styles.css it disappears form the list. Everything still shows up correctly in design view, but I just can't seem to see the file "styles.css" in the list.

     

    I believe this occured when I accidentlayy clicked something in the "Open File" window toward the bottom. I have gone into the site settings the make sure that "Links relative to:" is set to "Document", but I still get the problem.

     

    Any ideas?

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 11, 2013 4:48 PM   in reply to psdasap

    >However, for some reason I can only see the associated files if they have relative links

     

    First, to clarify some terminolgy - when you add slash to the path, it is still a relative link; it's a site root relative link as opposed to document relative. These are  not absolute links.

     

    Where is your styles.css located in your site? Where is the document you are working on located?

     

    Also, it's usually best to start a new thread rather than reviving one that's 4 years old.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 11, 2013 5:18 PM   in reply to bregent

    The styles.css file is located at the root of the site with the page calling it. I am using Dreamweaver CS5. I switched to my CS6 and it works fine. However, I don't like to use CS6 as it runs slower on the computer that I am using. I have gone so as to delete the in managee sites and recreate it. I have compared the preferences as well as all of the site definitions between both versions of Dreamweaver and everything looks the same, yet I get the same problem. I think it might be time to reset Dreamweaver settings, but I can't seem to remember the keys I need to hold down upon restarting.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 11, 2013 9:24 PM   in reply to psdasap

    Have you tried clearing the site cache? I would think that deleting and recreating the site would effectively do that, but try clearing it anyway.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 12, 2013 7:26 AM   in reply to bregent

    How do you clear Dreamweaver's Cache on a Mac?

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 12, 2013 7:35 AM   in reply to psdasap
     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points