Using Templates in Dreamweaver MX 2004
As an alternative to creating each page on your Web site separately, you can create the basic layout and navigation system once and use it as a template for each of your pages. Macromedia Dreamweaver MX 2004 templates can be modified at any time, and will update changes to the rest of your Web site. Dreamweaver templates can be a valuable way to save time and guarantee a consistent design.
Before you begin, you will need to follow the instructions in Creating a Web Site in Dreamweaver and Creating a Web Page in Dreamweaver.
1. Making a Template Page
Open up the page you have created in Macromedia Dreamweaver MX 2004. From the File menu, select Save As Template. Make sure your site is selected, type in a file name under Save As, click Save, and then Yes to Update Links? Your template page will now have a .dwt file extension.
![]()
2. Adding Editable Regions
Add an editable region for each section of the layout that will differ from page to page. Without editable regions, you won't be able to edit pages created from the template.
Go to the Insert menu and select Template Object and then Editable Region. Enter in a name and click OK.

Save and Close the template page.
Click on the Refresh button in the Files window. There will be a new Templates folder containing your template page as a .dwt file (click on the + to see the files inside of a folder).
Delete the original template.htm file (not the template.dwt file) by clicking on the file name and pressing Delete. Click OK.
3. Adding Pages Based on the Template.
From the File menu, select New. Select the Template tab. Under Templates for, select your site. Under Site, select your template. A preview of your template should appear on the right. Check the box for Update page when template changes and click Create.

A new page based on the template will open up. Save the page in the folder you created for your Web site and give it a meaningful name (for example, index.htm). Use Save As to make a new page for each section of your site. If your site has more than one folder, the Update Links box appears. Click Yes. If you click No, the links to other pages on your site will be broken.
Be sure to close all of your pages before making changes to the template. Each time you save the template .dwt file, the Update Template Files box opens. Click the Update button. Changes made to the template will be updated on each page that is based on the template, with the exception of any pages that are open in Dreamweaver.

The Update Pages log appears. Click the Close button.

