Defining Editable Regions

Your next task is to specify which parts of your template you want locked and which you want editable. By default, everything on a page is locked. After all, the main reason to use a template is to maintain a consistent, unchanging design and structure among pages. To make a template usable, you have to define the area or areas that page authors can change.

To add an editable region to a template, start by selecting the part of the page you want to make changeable. You can designate as editable anything in the document window (that is, any HTML between the <body> tags).

Note

You can always add Cascading Style Sheets, JavaScript code, and meta tags to the <head> of a template-based page. Any <head> content in the original template files stays put in the page you create from it, however. For example, you can’t remove an external style sheet applied to a template from a page based on that template.

For templates you create from scratch, place your cursor at the point where you want to insert an editable region. For templates you build from an existing page, drag across your page to select the elements you wish to make editable, or, for greater precision, use the Tag Selector (see The Insert Panel) to make sure you select the exact HTML you want.

Now tell Dreamweaver that you want to make the selected elements editable. You can use any of these techniques:

  • In the Common category of the Insert panel (Figure 19-2), select Editable Region from the Template menu.

  • Choose ...

Get Dreamweaver CS6: 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.