Define Editable Regions

Your next project is to specify which parts of your template are locked, and which are editable. By default, everything on a page is locked. After all, the main reason to use templates is to maintain a consistent, unchanging design and structure between pages. To make a template usable, you must define the area or areas you can change.

Adding a Basic Editable Region

To add an editable region to a template, start by selecting the part of the page you want to be able to change. You can incorporate anything in the document window (any HTML between the <body> tags).

Note

Dreamweaver 4 did not allow changes to the <head> of a page based on a template. Dreamweaver MX reverses that behavior. You can add custom style sheets, JavaScript, and meta tag information freely to any page created from a template (in fact, there’s now no way to prevent users from doing this).

Drag across your page to select the elements you wish to make editable, or, for greater precision, you can use the tag selector (page 19) to make sure you select the exact HTML you want.

Now tell Dreamweaver that the selected elements are to be editable. You can use any of these techniques:

  • Click the Editable Region button in the Templates tab of the Insert bar (see Figure 18-2).

  • Choose InsertTemplate ObjectsEditable Region..

  • Press Ctrl+Alt+V (Option-Note-V).

  • Right-click (Control-click) the selection and choose Templates ...

Get Dreamweaver MX: The Missing Manual now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.