This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Dreamweaver > April 2004 > Re: Hyperlinks wrk in Template, Not pages
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: Hyperlinks wrk in Template, Not pages
|
|
| William Nichols 2004-04-21, 2:34 pm |
| I would go here for an over view - as well in the help in dreamweaver.
http://www.macromedia.com/support/d...plate_paths.htm
make sure with your templates that you have it in the Templates folder.
Templates should be the ONLY thing in that folder.
Don't move your templates in and out of there.
from the Dreamweaver help on templates:
Links in templates
To create a link in a template file, use the folder icon or the
Point-to-File icon in the Property inspector; don't type in the name of the
file to link to. If you type the name, the link might not work. This section
explains how Dreamweaver handles links in templates.
When you create a template file from an existing page, then save that page
as a template, Dreamweaver updates the links so they point to the same files
as before. Because templates are saved in the Templates folder, the path for
a document-relative link changes when you save the page as a template. In
Dreamweaver, when you create a new document based on that template and save
the new document, all the document-relative links are updated to continue to
point to the correct files.
When you add a new document-relative link to a template file, however, if
you type the path into the link text box in the Property inspector, it's
easy to enter the wrong path name. The correct path is the path from the
Templates folder to the linked document, not the path from the
template-based document's folder to the linked document.
For information about linking using the Point-to-File icon, see Linking
files and documents.
Hope that helps:
Bill
"mtpeace" <webforumsuser@macromedia.com> wrote in message
news:c5h4va$os0$1@forums.macromedia.com...
> Hi Friends,
>
> I've created a template with hyperlinks to other pages in the uneditable
> zones. If I F12 the links in the hyperlink to test them they work fine.
> When I
> test the same hyperlinks in pages created from the template the hyperlink
> does
> not work.
>
> Thanks for your time,
> MTC
>
| |
| Murray *TMM* 2004-04-21, 2:34 pm |
| This is how DMX will work if you are using ROOT RELATIVE links, *and*
temporary files to preview.
Here's an example -
* I create a page with a link to an image -> <img src="/images/foo.gif">
(note that the image link is a root relative link)
* I preview that page with DMX (since I am using temp files, DMX is kind
enough to realize that root relative links won't work in a preview, and so
it converts them to document relative links when it builds the temporary
file for the preview) -> <img src="../images/foo.gif"> (I'm assuming that
your document is one level below the root of the site). In the preview,
this page looks fine because the browser has no trouble with the document
relative link - it knows where the file it just opened is, and can follow
the path to the image).
* I then click on a link in the previewed page to another page that also has
ROOT relative linked images --> <img src="/images/bar.gif"> and suddenly
the image does not load.
Why? Because when you click away from the temp file DMX just built for you,
you have lost the benefit of the automatic conversion that DMX does with
root relative links, and the browser looks for this new image starting from
the root of the hard drive, not the root of your site.
The solution is to not use root relative links, and to change all your
existing ones to document relative.
To read more about this, go here -
http://www.macromedia.com/support/d...te_root_rel.htm
--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================
"mtpeace" <webforumsuser@macromedia.com> wrote in message
news:c5h4va$os0$1@forums.macromedia.com...
> Hi Friends,
>
> I've created a template with hyperlinks to other pages in the uneditable
> zones. If I F12 the links in the hyperlink to test them they work fine.
When I
> test the same hyperlinks in pages created from the template the hyperlink
does
> not work.
>
> Thanks for your time,
> MTC
>
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|