In cases where there is a field conflict, fields of the _repeat object take precedence over fields of
the _document object. Therefore, you shouldn't need to explicitly reference _document or
_repeat except that _document might be needed inside a repeat region to reference document
parameters that are hidden by repeated region parameters.
When nested repeated regions are used, only fields of the innermost repeated regions are available
implicitly. Outer regions must be explicitly referenced using _parent.
The Multiple If condition in template code
You can define template expressions for if and multiple-if conditions (see
on page
224). This example demonstrates defining a parameter named
value, and defining a Multiple If condition which determines which logo to display.
The following is an example of the code you might enter in the
<!-- TemplateParam name="Dept" type="number" value="1" -->
The following condition statement checks the value assigned to the Dept parameter. When the
condition is true or matches, the appropriate image is displayed.
<!-- TemplateBeginMultipleIf -->
<!-- checks value of Dept and shows appropriate image-->
<!-- TemplateBeginClause cond="Dept == 1" --> <img src=".../sales.gif"> <!--
TemplateEndIfClause -->
<!-- TemplateBeginIfClause cond="Dept == 2" --> <img src=".../support.gif">
<!-- TemplateEndIfClause-->
<!-- TemplateBeginIfClause cond="Dept == 3" --> <img src=".../hr.gif"> <!--
TemplateEndIfClause -->
<!-- TemplateBeginIfClause cond="Dept != 3" --> <img src=".../spacer.gif">
<!-- TemplateEndIfClause -->
<!-- TemplateEndMultipleIf -->
When you create a template-based document, the template parameters are automatically passed
to it. The template user determines which image to display (see
on page
249).
Creating a Dreamweaver template
You can create a template from an existing document (such as an HTML, Macromedia
ColdFusion, or Microsoft Active Server Pages document) or you can create a template from a
new, blank document.
After you create a template, you can insert template regions (see
on page
216). You can also set template preferences for code coloring and template region
highlight color (see
"Setting highlighting preferences for template regions" on page
Tip: You can store additional information about a template (such as who created it, when it was last
changed, or why you made certain layout decisions) in a Design Notes file for the template (see
"Associating Design Notes with files" on page
the template's Design Notes.
226
Chapter 11: Managing Templates
"Customizing code coloring preferences for a template" on page 228
head
"Modifying template properties"
"Types of template regions"
229).
109). Documents based on a template do not inherit
"Template expressions"
, setting an initial
"Dept"
section of the template:
and
Need help?
Do you have a question about the DREAMWEAVER MX 2004-USING DREAMWEAVER and is the answer not in the manual?
Questions and answers