Designating Editable Regions
In this final task, you'll specify editable regions on the template you just created for the Jade Valley Web site. An editable region refers to the areas on the template in which users can edit and modify content. All other areas in a document are locked, and users can't change them. Dreamweaver automatically locks the whole document when you first save a227 document as a template, you need to go back and make some regions editable.
You can create an editable region anywhere in the template document. For the template to be effective, you want to make the content areas editable, so that you can easily and quickly create all the pages for the site.
1. | Open jadevalley_template.dwt in split view. In the design half of split view, click to select the yellow Named Anchor Link icon. Then in the code half of split view, drag the entire block of highlighted code for the named anchor link to the left of the opening <h1> tag, as shown in the figure. |
As you know, the anchor link was created to enhance accessibility, and you don't want anyone to edit it or accidentally delete it. As a result, you need to keep the named anchor as part of the locked region, so that anyone using the template can't accidentally remove it. But you don't want Main Heading to be the heading of every page! The main heading must be editable, while the image must not. Therefore, you'll have to move the image outside the <h1> tag.
[View full size image]

All the highlighted text is placeholder content. The whole point of creating a template is to replace placeholder text with real content, which isn't possible if it's locked.
[View full size image]

3. | Select Insert > Template Objects > Editable Region. The Editable Region dialog appears. Enter content_main in the Name field and click OK to create the editable region . |

Always use a unique and descriptive name for the editable region. Because a template can have multiple editable regions, you can't use the same name for more than one editable region in a page template.
After you designate an editable region, Dreamweaver encloses the area in a highlighted box in the template. The tab at the upper-left corner of the region shows the name of that editable region. The tab is for identification only; it doesn't appear in browsers.
[View full size image]

4. | Position the cursor in the left column of the page. Select <div#special_content> from the Tag selector. In the Common category of the Insert bar, choose the Template drop-down and select Editable Region. |
The entire left column is reserved for special content. You want the entire section to be editable, so you can bring in unique content for different parts of the Jade Valley Web site. By selecting <td.content_left> from the Tag selector, you ensure that the entire cell is editable.
[View full size image]

5. | In the New Editable Region dialog, type content_special. Click OK to create this editable region . |

Unfortunately, Dreamweaver provides no visual feedback that this entire layer is editable. However, you can verify that it is by switching to code view. Surrounding the <div id="special_content"> tag is a227 comment: <!-- TemplateBeginEditable name="content_special" -->, which is how Dreamweaver identifies editable template regions.
6. | Save and close jadevalley_template_main.dwt. |
The template is ready to use. In the next lesson, you'll use it to create the entire Jade Vallley site.