beautypg.com

About dreamweaver templates – Adobe Dreamweaver CC 2014 v.13 User Manual

Page 511

background image

About Dreamweaver templates

To the top

To the top

To the top

Understanding Dreamweaver templates
Types of template regions
Links in templates
Server scripts in templates and template-based documents
Template parameters
Template expressions
Template expression language
Multiple If condition in template code

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

.

Understanding Dreamweaver templates

A template is a special type of document that you use to design a “fixed” page layout; you can then create documents based on the template that
inherit its page layout. As you design a template, you specify as “editable” which content users can edit in a document based on that template.
Templates enable template authors to control which page elements template users—such as writers, graphic artists, or other web developers—can
edit. There are several types of template regions the template author can include in a document.

Note: Templates enable you to control a large design area and reuse complete layouts. If you want to reuse individual design elements, such as
a site’s copyright information or a logo, create library items.

Using templates enables you to update multiple pages at once. A document that is created from a template remains connected to that template
(unless you detach the document later). You can modify a template and immediately update the design in all documents based on it.

Note: Templates in Dreamweaver differ from templates in some other Adobe Creative Suite software in that page sections of Dreamweaver
templates are fixed (or uneditable) by default.

Types of template regions

When you save a document as a template, most regions of a document are locked. As a template author, you specify which regions of a template-
based document will be editable by inserting editable regions or editable parameters in the template.

As you create the template, you can make changes to both editable and locked regions. In a document based on the template, however, a
template user can make changes only in the editable regions; the locked regions can’t be modified.

There are four types of template regions:

An editable region An unlocked region in a template-based document—a section a template user can edit. A template author can specify any
area of a template as editable. For a template to be effective, it should contain at least one editable region; otherwise, pages based on the
template can’t be edited.

A repeating region A section of the document layout that is set so that the template user can add or delete copies of the repeating region in a
document based on the template as necessary. For example, you can set a table row to repeat. Repeating sections are editable so that the
template user can edit the content in the repeating element, while the design itself is under the control of the template author.

There are two types of repeating regions you can insert in a template: repeating region and repeating table.

An optional region A section of a template that holds content—such as text or an image—that may or may not appear in a document. In the
template-based page, the template user usually controls whether the content is displayed.

An editable tag attribute Lets you unlock a tag attribute in a template, so the attribute can be edited in a template-based page. For example, you
can “lock” which image appears in the document but let the template user set the alignment to left, right, or center.

Links in templates

When you create a template file by saving an existing page as a template, the new template in the Templates folder, and any links in the file are
updated so that their document-relative paths are correct. Later, when you create a document based on that template and save it, all the
document-relative links are updated again to continue to point to the correct files.

When you add a new document-relative link to a template file, it’s easy to enter the wrong path name if you type the path into the link text box in
the Property inspector. The correct path in a template file 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. Ensure that the correct paths for links exist by using either the folder icon or the Point-
to-file icon in the Property inspector when creating links in templates.

504

This manual is related to the following products: