Applying a template to an existing document

Applying a template to an existing document

When you apply a template to a document which contains existing content, Dreamweaver attempts to match the existing content to a region in the template. If you are applying a revised version of one of your existing templates, the names are likely to match.

If you apply a template to a document that hasn’t had a template applied to it, there are no editable regions to compare and a mismatch occurs. Dreamweaver tracks these mismatches so you can select which region or regions to move the current page’s content to, or you can delete the mismatched content.

You can apply a template to an existing document using the Assets panel or from the Document window. You can undo a template application if necessary.

To apply a template to an existing document using the Assets panel:

  1. Open the document you want to apply the template to.
  2. In the Assets panel (Window > Assets), select the Templates category on the left side of the panel.This is a picture of the feature being described.
  3. Do one of the following:
    • Drag the template you want to apply from the Assets panel to the Document window.
    • Select the template you want to apply, then click the Apply button at the bottom of the Assets panel.

    If content exists in the document that can’t be automatically assigned to a template region, the Inconsistent Region Names dialog box appears.

  4. If you have unresolved content, select a destination for the content, then click OK.

    For information about moving existing content to editable regions in the document, see Resolving inconsistent region names.

To apply a template to an existing document from the Document window:

  1. Open the document you want to apply the template to.
  2. Select Modify > Templates > Apply Template to Page.

    The Select Template dialog box appears.

  3. Choose a template from the list, then click Select.

    If content exists in the document that can’t be automatically assigned to a template region, the Inconsistent Region Names dialog box appears.

  4. If you have unresolved content, select a destination for the content, then click OK.

    For information about moving existing content to editable regions in the document, see Resolving inconsistent region names.

To undo the template changes:

  • Select Edit > Undo Apply Template.

The document reverts to its state before the template was applied.

Related topics

  • Detaching a document from a template


Getting Started with Dreamweaver
Dreamweaver Basics
Working with Dreamweaver Sites
Laying Out Pages
Laying Out Pages with CSS
Managing Templates
Adding Content to Pages
Working with Page Code
Preparing to Build Dynamic Sites
Making Pages Dynamic
Developing Applications Rapidly