Untitled Document

Opening 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.

To open and edit a template file:

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


template 1

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

  1. 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.
      This is a picture of the feature being described.

The template opens in the Document window.

  1. Modify the content of the template as desired.

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

  1. Save the template.

Dreamweaver prompts you to update pages based on the template.

  1. 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.

To 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 content of the template as desired.

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

  1. Save the template.

Dreamweaver prompts you to update pages based on the template.

  1. 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.

Manually updating documents that are 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.

To 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.

To update the entire site or all documents that use a specified template:

  1. Select Modify > Templates > Update Pages.

The Update Pages dialog box appears.

  1. Complete the dialog box, then click Start.

Dreamweaver updates 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.

  1. Click Close to close the dialog box.

Checking template syntax

Dreamweaver automatically checks the template syntax when you save a template, but you can manually check the template syntax prior to saving a template. For example, if you add a template parameter or expression in Code view, you can check that the code follows correct syntax.

To check for valid template syntax:

  1. Open the document you want to check in the Document window.
  2. Select Modify > Templates > Check Template Syntax.

An error message appears if the syntax is badly formed. The error message describes the error and refers to the specific line in the code where the error exists