
Chapter 16
388
Using styles, timelines, behaviors, and head tags in templates
CSS styles, timelines, behaviors, and
head
section tags are not fully supported in
documents based on templates.
All of those elements insert information in the
head
section of a document. Since
the
head
section of a document based on a template is locked (except for the
document’s title), Dreamweaver can’t insert a style sheet or JavaScript code in such
a document. To use these items in a document based on a template, you must add
them to the template file that the document is based on. (To allow a style sheet in
a template file to be editable without having to update pages every time you
change the style sheet, use an external style sheet.)
If adding these elements to the template file isn’t possible, you can detach the
document from the template, which makes the
head
section editable. However,
after you detach the document from the template, the document will no longer
update when you change the template. See “Detaching a document from a
template” on page 391.
For more information about these elements, see “Using CSS style sheets” on page
248, “Animating your layers” on page 425, and “Using Behaviors” on page 435.
Creating documents based on templates
You can use a template as a starting point for a new document, or apply a template
to an existing document.
When you create a new document based on a template, you can choose whether
the document will remain attached to the template. By default, when you change
a template, a document based on that template is updated to reflect changes in the
template. But if you deselect the Update Page When Template Changes option in
the New from Template dialog box, the new document is created as stationery: a
copy of the template that’s an independent HTML file, with no locked or editable
regions. In that case, updating the template does not change the document. In
other words, deselecting this option is equivalent to creating a new document
based on a template and then detaching the document from the template.
Note:
The option of not updating the document when the template changes is provided for
those who want to use templates like stationery files—a one-time starting point, to create
completely independent documents. If you want to use the Dreamweaver default template
behavior, in which documents based on a template are updated when the template
changes, leave the option selected.
Summary of Contents for 38028779 - Macromedia Dreamweaver - Mac
Page 1: ...macromedia Using Dreamweaver...
Page 148: ...Chapter 4 148...
Page 296: ...Chapter 12 296...
Page 472: ...Chapter 18 472...
Page 512: ...Chapter 21 512...
Page 562: ...Appendix 562...