HighDots Forums  

dreamweaver template / having trouble seeing thepreviews

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss dreamweaver template / having trouble seeing thepreviews in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
happydreamweaver
 
Posts: n/a

Default dreamweaver template / having trouble seeing thepreviews - 11-30-2007 , 09:23 AM






I am designing a website, using Dreamweaver for the first time, and I would
like to ask your advice.

Do you know how to apply a dreamweaver template to other html pages. I have
having trouble seeing the previews in the local browser. For examples, when I
preview an html page, that has the template included, I see the page OK. But
when I click to go to another page with the sample template, the new page shows
up, but without the template design included.


Reply With Quote
  #2  
Old   
Murray *ACE*
 
Posts: n/a

Default Re: dreamweaver template / having trouble seeing the previews - 11-30-2007 , 09:52 AM






Quote:
Do you know how to apply a dreamweaver template to other html pages
Spawn a new page from the template, and copy and paste from your existing
pages. There's no other way to do this.

Quote:
But
when I click to go to another page with the sample template, the new page
shows
up, but without the template design included.
Didn't we already answer this for you?

You are being confused by a) not understanding root relative vs document
relative links, and b) not understanding how DW previews files.

If I have a document with a link to an image that looks like this -

<img src="/images/foo.gif"...

That's what's called a root relative link.

If I preview that document in DW, then the browser gets the document, sees
the leading "/" and reads that as the root of the hard drive, since the
browser has no idea where the root of the site is. Thus, the image is
broken in the preview.

If I have temp files enabled, then DW will secretly convert the file being
previewed into a temporary file, and hand that to the browser. This temp
file has had all root relative links converted to document relative links
(as you will see by looking at the code in the browser), and has had all
include files actually embedded in the page, and has had all external CSS
and js markup embedded in the page. In other words, DW has made the
document into a stand-alone page.

If you do not have temp files enabled, all of these links would be broken on
preview.

Now - if you are using root relative links, AND you have temp files enabled,
AND you click away from the previewed document, then all of your links will
be broken, since DW has not made that linked file into a temp file. This is
what you are seeing.

So - if you want to click away on preview, then you must use document
relative links for the site -

<img src="../images/foo.gif"... (for example)

These will still work on preview since the browser knows how to determine
the current file's location and how to follow that path.

GEDDIT?

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"happydreamweaver" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
I am designing a website, using Dreamweaver for the first time, and I would
like to ask your advice.

Do you know how to apply a dreamweaver template to other html pages. I
have
having trouble seeing the previews in the local browser. For examples,
when I
preview an html page, that has the template included, I see the page OK.
But
when I click to go to another page with the sample template, the new page
shows
up, but without the template design included.



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.