Learn how to recognize templates and template-based documents in Dreamweaver Design view and Code view.

Recognize templates in Design view

In Design view, editable regions appear in the Document window surrounded by rectangular outlines. See the bottom pane in the Document window to view the name of the region.

You can identify a template file by looking at the title bar in the Document window. The filename extension for the file is .dwt.

Recognize templates in Design View
Recognize templates in Design View

Recognize templates in Code view

In Code view, editable content regions are marked in HTML with the following comments:

<!-- TemplateBeginEditable> and <!-- TemplateEndEditable -->

Notă:

You can use code color preferences to set your own color scheme so you can easily distinguish template regions when you view a document in Code view.

Everything between these comments will be editable in documents based on the template. The HTML source code for an editable region might look like this:

<table width="75%"  border="1"  cellspacing="0" cellpadding="0"> 
  <tr bgcolor="#333366"> 
    <td>Name</td> 
    <td><font color="#FFFFFF">Address</font></td> 
    <td><font color="#FFFFFF">Telephone Number</font></td> 
  </tr> 
  <!-- TemplateBeginEditable name="LocationList" --> 
  <tr> 
    <td>Enter name</td> 
    <td>Enter Address</td> 
    <td>Enter Telephone</td> 
  </tr> 
  <!-- TemplateEndEditable --> 
</table>

Notă:

When you edit template code in Code view, be careful not to change any of the template-related comment tags that Dreamweaver relies on.

Recognize template-based documents in Design view

In a document based on a template (a template-based document), editable regions appear in the Design view of the Document window surrounded by rectangular outlines in dotted lines. The bottom of the window shows the name of the region.

In addition to the editable-region outlines, the entire page is surrounded by a different-colored outline, with a tab in the upper-right corner giving the name of the template that the document is based on. This highlighted rectangle reminds you that the document is based on a template and that you can’t change content outside the editable regions.

Recognize template-based documents in Code view

In Code view, editable regions of a document derived from a template appear in a different color than code in the non-editable regions. You can make changes only to code in the editableregions or editable parameters but you cannot type in locked regions.

Editable content is marked in HTML with the following Dreamweaver comments:

<!‑‑ InstanceBeginEditable> and <!‑‑ InstanceEndEditable ‑‑>

Everything between these comments is editable in a template-based document. The HTML source code for an editable region might look like this:

<body bgcolor="#FFFFFF" leftmargin="0"> 
<table width="75%"  border="1"  cellspacing="0" cellpadding="0"> 
  <tr bgcolor="#333366"> 
    <td>Name</td> 
    <td><font color="#FFFFFF">Address</font></td> 
    <td><font color="#FFFFFF">Telephone Number</font></td> 
  </tr> 
  <!-- InstanceBeginEditable name="LocationList" --> 
  <tr> 
    <td>Enter name</td> 
    <td>Enter Address</td> 
    <td>Enter Telephone</td> 
  </tr> 
  <!-- InstanceEndEditable --> 
</table> 
</body>

The default color for non-editable text is gray; you can select a different color for the editable and non-editable regions in the Preferences dialog box.

Această lucrare este oferită sub licență Atribuire-Necomercial-FărăModificări 3.0 Ne-adaptată Creative Commons  Postările pe Twitter™ şi Facebook nu sunt acoperite de condiţiile de licenţiere Creative Commons.

Prevederi legale   |   Politică de confidențialitate online