How to apply or remove a template from an existing document in Dreamweaver
Learn how to apply or remove a template from an existing document in Dreamweaver using the Assets panel.

When you apply a template to a document that 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.

Opomba:

When you apply a template to an existing document, the template replaces the document’s contents with the template’s boilerplate content. Always back up a page’s contents before applying a template to it.

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 icon on the left side of the panel.

  3. Do one of the following:
    • From the Design view, 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. Select a destination for the content by using the Move Content to New Region menu to select one of the following:
    • Select a region in the new template to move the existing content to.

    • Select Nowhere to remove the content from the document.

  5. To move all unresolved content to the selected region, click Use For All.
  6. Click OK to apply the template or click Cancel to cancel the application of the template to the document.

    Opomba:

    When you apply a template to an existing document, the template replaces the document’s contents with the template’s boilerplate content. Always back up a page’s contents before applying a template to it.

Apply a template to an existing document from the Document window

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

  3. From the Select Template dialog box, 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. Select a destination for the content by using the Move Content to New Region menu to select one of the following:
    • Select a region in the new template to move the existing content to.

    • Select Nowhere to remove the content from the document.

  5. To move all unresolved content to the selected region, click Use For All.
  6. Click OK to apply the template or click Cancel to cancel the application of the template to the document.

    Opomba:

    When you apply a template to an existing document, the template replaces the document’s contents with the template’s boilerplate content. Always back up a page’s contents before applying a template to it.

Detach a document from a template

To make changes to the locked regions of a document based on a template, you must detach the document from the template. When the document is detached, the entire document becomes editable.

Opomba:

You cannot convert a template file (.dwt) to a normal file by simply resaving the template file as an HTML (.html) file. Doing so does not delete the template code that appears throughout the document. If you want to convert a template file to a normal file, you can save the document as a normal HTML file, but must then manually delete all of the template code in Code view.

  1. Open the template-based document you want to detach.
  2. Select Tools > Templates > Detach from Template.

    The document is detached from the template and all template code is removed.