Reusing Content with Templates and Libraries > Defining a template's editable regions > Viewing editable and locked HTML source code

 

Viewing editable and locked HTML source code

Editable content is marked in HTML with the Dreamweaver comments #BeginEditable and #EndEditable. Everything between those comments is editable. The HTML source code for an editable region named Edit_Region might look like this:

<!-- #BeginEditable "Edit_Region" -->
	{Edit_Region}
<!-- #EndEditable -->

The HTML for an editable table named Editable_Table might look like this:

<!-- #BeginEditable "Editable_Table" -->
<table width="77%" border="1">
	<tr> 
		<td>&nbsp;</td>
		<td>&nbsp;</td>
	</tr>
</table>
<!-- #EndEditable -->

In template files, editable regions are not highlighted in the Document window's Code view (or the Code inspector); you can make changes to both editable and locked HTML source code.

For documents based on templates, if syntax coloring is enabled, locked regions are highlighted in the code editors. (For information about enabling syntax coloring, see Setting Code view (or Code inspector) options.) You can make changes only to the editable (nonhighlighted) HTML source code.

Note: Dreamweaver does not prevent you from typing in locked regions in the Code inspector or the Code view of the Document window. However, Dreamweaver discards all changes you make to locked regions, so be careful to type only in editable regions.