Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Path Link Problems

Status
Not open for further replies.

RSedlacek

Programmer
Oct 5, 1998
59
0
0
US
I've searched the forum and can't really find an answer for my situation. I hope I can explain my problem accurately.

I am developing a site using DreamWeaver CS3 and ColdFusion, but I am having a lot of trouble with link paths. I have tried setting "Links relative to:" both "Document" and "Site root". Neither seems to work correctly for my situation. I have all of the files residing on my local computer which is also the testing site. I also have a remote server which the completed site will be hosted on. I can build the site locally and preview everything in browsers with no problems. All images show up correctly. All CSS styles show up correctly. However, once I "put" (upload) the files to the remote server everything breaks. Images to not show up. CSS styles are carried throughout the site. ColdFusion seems to function as expected. I have to go in and "Find and Replace" to change all of the path links for the site to load correctly.

1. There has to be a better way, so you don't have to go to this much trouble.

2. I could put up with this inconvenience, but even changing the path links manually...some of the pages still won't load correctly. (I think this has something to do with my directory structure. Continue reading.)

I think that there is a problem with the way my pages are created. I am using <cfinclude template> for common areas of my site...head, navigation, footer, etc. I've also use a main template (which includes these <cfinclude> tags) on which to build all my pages. I'm wondering if the problem might have something to do with my directory structure.

Here is an example of my site's directory structure...

Code:
Site
   admin
      directory
         index.cfm
         other-pages.cfm
   assets
      images
         logo.gif
         header.gif
         other_images.gif
   includes
      footer.cfm
      head.cfm
      navigation.cfm
   directory
      index.cfm
      other_pages.cfm
   Templates
      maintemplate.dwt.cfm
   index.cfm
   some_other_pages.cfm

I can get the root directory files to load correctly after using "Find and Replace" to change the paths, but this method doesn't work when trying to fix files in subdirectories in the admin and directory folders. (Subdirectory files use the same "includes" files and are based off the same "maintemplate.dwt.cfm".)

Can anyone tell me what I am doing wrong? Any suggestions?

 
I think I may have figured it out. At least I think I might be on the right path. (pardon the pun) I think it has to do with CF mappings. I'll post an update if I get it figured out.
 
ColdFusion Mappings seems to work...mostly. You have to go into the CF Administrator to set the mappings path which is easy to do. I also went into my Application.cfm file and set a variable for my site's path name (ie: and cfoutput it in all image and href links. This works fine, but now the only problem I have is that DreamWeaver does not recognize any of the images or includes in the design view. This isn't a big deal if you only use the code view, but it sure would be nice to be able to do a quick preview in design view. (Previewing in the browser does work.)

Anybody have any suggestions?
 
Still haven't found a solution to this issue yet. Does anyone have any suggestions?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top