beautypg.com

Linking, Linking files and documents – Adobe Dreamweaver CC 2015 User Manual

Page 343

background image

336

Linking and navigation

Last updated 6/3/2015

A site root–relative path is often the best way to specify links if you frequently move HTML files from one folder to
another in your website. When you move a document that contains site root–relative links, you don’t need to change
the links since the links are relative to the site root, and not to the document itself; for example, if your HTML files use
site root–relative links for dependent files (such as images), then if you move an HTML file, its dependent-file links are
still valid.

However, when you move or rename the documents targeted by site root–relative links, you must update those links,
even if the documents’ paths relative to each other haven’t changed. For example, if you move a folder, you must update
all site root–relative links to files in that folder. (If you move or rename files using the Files panel, Dreamweaver updates
all relevant links automatically.)

More Help topics

Test links in Dreamweaver

Set the relative path of new links

Working with Dreamweaver sites

Linking

Note: The user interface has been simplified in Dreamweaver CC and later. As a result, you may not find some of the
options described in this article in Dreamweaver CC and later. For more information, see

this article

.

Linking files and documents

Before creating a link, make sure you understand how absolute, document-relative, and site root–relative paths work.
You can create several types of links in a document:

• A link to another document or to a file, such as a graphic, movie, PDF, or sound file.

• A named anchor link, which jumps to a specific location in a document.

• An e-mail link, which creates a new blank e-mail message with the recipient’s address already filled in.

• Null and script links, which you use to attach behaviors to an object or to create a link that executes JavaScript code.

You can use the Property inspector and the Point-To-File icon to create links from an image, an object, or text to
another document or file.

Dreamweaver creates the links to other pages in your site using document-relative paths. You can also tell Dreamweaver
to create new links using site root–relative paths.

Note: Always save a new file before creating a document-relative path; a document-relative path is not valid without a
definite starting point. If you create a document-relative path before saving the file, Dreamweaver temporarily uses an
absolute path beginning with file:// until the file is saved; when you save the file, Dreamweaver converts the file:// path to
a relative path.

For a tutorial on creating links, see

www.adobe.com/go/vid0149

.