The purpose of this dialog box is to create template parameters and to define conditional statements (If...else statements) for template regions. You can use simple true/false operations, or define more complex conditional statements and expressions.
In the Advanced tab you can link multiple optional regions to a named parameter. In the template-based document, both regions will show or hide as a unit. For example, you can show a "closeout" image and sales price text area for a sale item.
You can also use the Advanced tab to write a template expression (see Template expressions) that evaluates a value for the optional region and shows it or hides it based on the value.
NOTE |
|
To set a different value for the parameter, in Code view locate the parameter in the |
NOTE |
|
Dreamweaver automatically inserts double-quotation marks around the text you enter. |
When you use the Optional Region template object, Dreamweaver inserts template comments in the code. A template parameter is defined in the head
section, as in the following example:
<!-- TemplateParam name="departmentImage" type="boolean" value="true" -->
At the location where the optional region is inserted, code similar to the code below appears:
<!-- TemplateBeginIf cond="departmentImage" --> <p><img src="/images/airfare_on.gif" width="85" height="22"> </p> <!-- TemplateEndIf -->
You can access and edit template parameters in the template-based document (see Modifying template properties).