New to web coding. DWT driving me crazy.

fuzzybabybunny

Moderator<br>Digital & Video Cameras
Moderator
Jan 2, 2006
10,455
35
91
Here's what my file system looks like:

http://fuzzybabybunny.smugmug....photos/180126188-L.jpg

I'm trying to build all my pages off of the main.dwt template in my Templates Folder.

I'm having some real problems with my relative links in the template.

Ex.

templates/main.dwt

Say that I'm editing main.dwt and I add in a relative link to my css file: ../content/themes/css/screen.css

Now I build my index.html with my main.dwt template. The resulting file has none of the styles from my css because it's trying to link to ../content/themes/css/screen.css, which to it doesn't make sense because it is in a different directory than my main.dwt. But if I edit the link in my dwt to themes/css/screen.css the styles now show up in index.html, but not in my main.dwt preview. All these broken links get worse when I work on my tutorials/panorama1.html page, which is in yet another different directory.

Does Dreamweaver have some sort of intelligent relative link updater for templates, or do I have to use absolute links?
 

troytime

Golden Member
Jan 3, 2006
1,996
1
0
your best bet is absolute paths

i'm pretty sure dreamweaver has options for it, but off hand i can't tell you where it is (haven't used dreamweaver in 3 or 4 years)

your paths will look like /content/themes/css/screen.css
and they'll never have to change (no matter where your html file is)

what version of dreamweaver are you using?
 
Aug 25, 2004
11,166
1
81
Originally posted by: troytime
your best bet is absolute paths

i'm pretty sure dreamweaver has options for it, but off hand i can't tell you where it is (haven't used dreamweaver in 3 or 4 years)

your paths will look like /content/themes/css/screen.css
and they'll never have to change (no matter where your html file is)

Agreed on all three counts.
 

fuzzybabybunny

Moderator<br>Digital & Video Cameras
Moderator
Jan 2, 2006
10,455
35
91
Originally posted by: George P Burdell
Originally posted by: troytime
your best bet is absolute paths

i'm pretty sure dreamweaver has options for it, but off hand i can't tell you where it is (haven't used dreamweaver in 3 or 4 years)

your paths will look like /content/themes/css/screen.css
and they'll never have to change (no matter where your html file is)

Agreed on all three counts.

I'm using CS3. I think it figured it out. I was using file relative paths before, but now that I've switched to root relative paths everything's ok. So basically exactly as you described above :)