Templates in Dreamweaver

To create a Dreamweaver template, one must first define a site in Dreamweaver. Dreamweaver templates are files constructed in Dreamweaver that have an extension .dwt and are stored in a folder named "Templates" within the site. Once the template is created, one can create one or more pages in Dreamweaver based on the template. After these pages are created, if in Dreamweaver one makes a change in a template and saves the termplate file, a message will be displayed asking whether files based on the template should be updated as well. Thus templates function like library items. However, all sections of a page utilizing library items can be changed, whereas in a file based on a template, no section of a page can be edited unless that section is made editable in the template file on which the page is based.

The simplest way to make a region editable is to construct an "editable region" in the template by Insert>Template Objects>Editable Region. Dreamweaver provides the capability to construct other sorts of regions which are intermediate between areas of a page that can't be changed at all and "editable regions" where any change can be made. Although two of these region types (optional region and editable optional region) are complex and not discussed here, two other region types are more straightforward and are discussed below:

Repeating region - Such a region can be repeated by the user. For example, the template could contain a two row table. The first row of the table would consist of column headings. The second row of the table would be made both an editable region and a repeating region. This would permit someone working with a page based on this template to add additional rows to the table by clicking the plus sign in the page based on the template. Although the repeating region of the table need not be an editable region, it is difficult to think of examples where one would want to use a repeating region that is not editable.

Repeating table - This is a simpler way to create a repeating, editable region within a table. Insert>Template Objects>Repeating Table will result in a dialog box being displayed that permits one to specify where the repeating rows of the table will begin and end.

Conclusion

Dreamweaver templates offer the updating capabilities of Dreamweaver while restricting the changes that can be made to web pages. A designer working solo would I think in general prefer the flexibility of Dreamweaver library items

Revised: June 19, 2003. Comment to William Pegram, wpegram@nvcc.edu