Unit 11.Using Dreamweaver Templates (I)

We're now going to learn what templates are, how to create them, and how to base files on them.



Each time we want to create a web site we have to follow a uniform format.

Most of us make copies of previously created files, and work on these copies by changing their content. This is the easiest way to have a page with a previously created structure.

Templates are a kind of copy of the page on which the rest of the web site is going to be based, but they include the possibility of establishing editable zones, while other zones cannot be modified.

It isn't possible to modify the properties of a page that is based on a template, apart from the title. When you want pages with, for example a different background color, you need to create a different template with different colors, and base the pages on the template depending on the background color you want for each one.

When you modify the design of a template, you can update all pages based on it.

Template are files with a DWT extention saved on the web site inside a folder named Templates.

Creating Templates

Templates can be created from zero, or starting from an existing page.

One way of creating templates from zero is through the Assets panel.

The Assets panel can be opened through the Window menu and then the Assets option. Also by pressing F11.

Once you have opened the panel you need to select the button. This way you can work with templates.

The Templates Assets panel's bottom buttons are similar to the ones in the CSS Styles panel .

The only different button is the first, used in this case to update the list, the rest of them allow you to create a new template, edit a selected template of the list, or clear it.


To create a new template you need to click on the button (if it isn't activated, right-click and select New Template).

When you press the button you create a new file in the templates list. You can also change its Name.

To modify a template select it from the list an click on the button.

To delete a template select it from the list and click on the button.

Templates are saved in the actual web site inside the Templates folder which is automatically created.

To create a template from an existing file, you need to open the file, and then save it as a template through the File menu, and Save as template.

When you select the former option, you see a window like the one on the right.

It's necessary to specify the name which you want to save the template as through the Save as field and then select the Site in which it's going to be saved from the sites list.