Technology Services
News & Events
Templates: Applying Templates
To keep your site looking consistent, you might decide to implement templates after you have created some pages. Dreamweaver allows you to apply templates to pages with existing content.
- Creating a New Template-Based Page
- Applying a Template to Existing Pages
- Detaching a Page from a Template
Creating a New Template-Based Page
Creating a new template-based page is very similar to creating a new page or template.
-
From the File menu, select New
The New Document dialog box appears. -
Select the Templates tab
-
In the Templates for scroll box, select the site that contains the template you would like to base your new page on
NOTE: You may only have one site listed in this box. -
In the Site "site name" scroll box, select the template you want to apply
-
OPTIONAL: To have the new page automatically update when the template is changed, select Update page when template changes
-
Click Create. The new page is created so now you can begin adding page content
Applying a Template to Existing Pages
Templates can be applied to web pages that you have already created. When a template is applied, Dreamweaver scans the web page for region names (for more information about regions, refer to Templates: An Overview). Since the web page is not currently based on a template, there are no region names in the page. Therefore, when Dreamweaver scans the page for region names, a mismatch occurs. Dreamweaver does not know what template region the existing content of the page should be placed in. You should then select the editable region of the template in which to place the existing content of the web page.
-
Open the web page you want to apply the template to
-
From the Modify menu, select Templates - Apply Template to Page
The Select Template dialog box appears.

-
From the Site pull-down list, select the site where the template is located
-
In the Templates scroll box, select the template you wish to apply to the page
-
OPTIONAL: Select Update page when template changes
NOTE: If this option is selected, every time the template is changed, your page will be updated. -
Click Select. The Inconsistent Region Names dialog box appears.
-
Select Document body
-
From the Move Content to New Region pull-down list, select an editable template region you wish to place the existing page content into. You might have more than one Editable Region so you would need to know which one you want to go into.
NOTE: All existing page content will be placed into this region. After the template has been applied, you can move portions of the existing content into other editable regions of the template. -
Select the Editable Region you want to Edit or Document head
-
From the Move Content to New Region pull-down list, select Head
NOTE: This allows you to preserve META tags, cascading style sheet, and other special header content from your original page after the template has been applied. -
Click OK. The template is applied.
Detaching a Page from a Template
If you no longer want a web page to be based on a template, you can detach the page from the template. The page will not lose any content, however, changes made to the template cannot be applied to the page after it is detached. Templates can always be re-applied to a page.
-
Open the web page you wish to detach from a template
-
From the Modify menu, select Templates - Detach from Template
The web page is detached from the template.