Note:

The user interface has been simplified in Dreamweaver CC and later. As a result, you may not find some of the options described in this article in Dreamweaver CC and later. For more information, see this article.

About editing and updating templates

When you make changes to and save a template, all the documents based on the template are updated. You can also manually update a template-based document or the entire site if necessary.

Note:

To edit a template for a Contribute site, you must use Dreamweaver; you cannot edit templates in Contribute.

Use the Templates category of the Assets panel to manage existing templates, including renaming template files and deleting template files.

You can perform the following template management tasks with the Assets panel:

  • Create a template

  • Edit and update templates

  • Apply or remove a template from an existing document

Dreamweaver checks template syntax when you save a template but it’s a good idea to manually check the template syntax while you’re editing a template.

Open a template for editing

You can open a template file directly for editing, or you can open a template-based document, then open the attached template for editing.

When you make a change to a template, Dreamweaver prompts you to update the documents based on the template.

Note:

You can also manually update the documents for template changes if necessary.

Open and edit a template file

  1. In the Assets panel (Window > Assets), select the Templates category on the left side of the panel .

    The Assets panel lists all of the available templates for your site and displays a preview of the selected template.

  2. In the list of available templates, do one of the following:
    • Double-click the name of the template you want to edit.

    • Select a template to edit, then click the Edit button  at the bottom of the Assets panel.

  3. Modify the contents of the template.

    Note:

    To modify the template’s page properties, select Modify > Page Properties. (Documents based on a template inherit the template’s page properties.)

  4. Save the template. Dreamweaver prompts you to update pages based on the template.
  5. Click Update to update all documents based on the modified template; click Don’t Update if you don’t want to update documents based on the modified template.

    Dreamweaver displays a log indicating the files that were updated.

Open and modify the template attached to the current document

  1. Open the template-based document in the Document window.
  2. Do one of the following:
    • Select Modify > Templates > Open Attached Template.

    • Right-click (Windows) or Control‑click (Macintosh), then select Templates > Open Attached Template.

  3. Modify the contents of the template.

    Note:

    To modify the template’s page properties, select Modify > Page Properties. (Documents based on a template inherit the template’s page properties.)

  4. Save the template. Dreamweaver prompts you to update pages based on the template.
  5. Click Update to update all documents based on the modified template; click Don’t Update if you don’t want to update documents based on the modified template.

    Dreamweaver displays a log indicating the files that were updated.

Rename a template

  1. In the Assets panel (Window > Assets), select the Templates category on the left side of the panel .
  2. Click the name of the template to select it.
  3. Click the name again so that the text is selectable, then enter a new name.

    This method of renaming works in the same way as renaming a file in Windows Explorer (Windows) or the Finder (Macintosh). As with Windows Explorer and the Finder, be sure to pause briefly between clicks. Do not double-click the name, because that opens the template for editing.

  4. Click in another area of the Asset panel, or press Enter (Windows) or Return (Macintosh) for the change to take effect.

    An alert asks if you want to update documents that are based on this template.

  5. To update all documents in the site that are based on this template, click Update. Click Don’t Update if you do not want to update any document based on this template.

Change a template description

The template description appears in the New Document dialog box when you’re creating a page from an existing template.

  1. Select Modify > Templates > Description.
  2. In the Template Description dialog box, edit the description and click OK.

Manually update documents based on templates

When you make a change to a template, Dreamweaver prompts you to update the documents based on the template, but you can manually update the current document or the entire site if necessary. Manually updating template-based documents is the same as reapplying the template.

Apply template changes to the current template-based document

  1. Open the document in the Document window.
  2. Select Modify > Templates > Update Current Page.

    Dreamweaver updates the document with any template changes.

Update the entire site or all documents that use a specified template

You can update all the pages in the site, or only update pages for a specific template.

  1. Select Modify > Templates > Update Pages.
  2. In the Look In menu, do one of the following:
    • To update all the files in the selected site to their corresponding templates, select Entire Site, then select the site name from the adjacent pop‑up menu.

    • To update files for a specific template, select Files That Use, then select the template name from the adjacent pop‑up menu.

  3. Make sure Templates is selected in the Update option.
  4. If you don’t want to see a log of the files Dreamweaver updates, deselect the Show Log option; otherwise, leave that option selected.
  5. Click Start to update the files as indicated. If you selected the Show Log option, Dreamweaver provides information about the files it attempts to update, including information on whether they were updated successfully.
  6. Click Close.

Update templates in a Contribute site

Contribute users can’t make changes to a Dreamweaver template. You can, however, use Dreamweaver to change a template for a Contribute site

Keep these factors in mind when updating templates in a Contribute site:

  • Contribute retrieves new and changed templates from the site only when Contribute starts up and when a Contribute user changes their connection information. If you make changes to a template while a Contribute user is editing a file based on that template, the user won’t see the changes to the template until they restart Contribute.

  • If you remove an editable region from a template, a Contribute user editing a page based on that template might be confused about what to do with the content that was in that editable region.

To update a template in a Contribute site, complete the following steps.

  1. Open the Contribute template in Dreamweaver, edit it, and then save it. For instructions, see Open a template for editing.
  2. Notify all of the Contribute users who are working on the site to restart Contribute.

Delete a template file

  1. In the Assets panel (Window > Assets), select the Templates category on the left side of the panel .
  2. Click the name of the template to select it.
  3. Click the Delete button  at the bottom of the panel, then confirm that you want to delete the template.

    Note:

    After you delete a template file, you can’t retrieve it. The template file is deleted from your site.

    Documents that are based on a deleted template are not detached from the template; they retain the structure and editable regions that the template file had before it was deleted. You can convert such a document into an HTML file without editable or locked regions.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy