The Multiple If condition in template code in Macromedia Dreamweaver
Posted by mrshuzan on May 20th, 2012The Multiple If condition in template code in Macromedia Dreamweaver
You are able to describe template appearances for if & several-if conditions (observe Template expressions in dreamweaver). This example shows important a parameter named “Dept”, setting a primary value & important a several If condition which determines which logo to show.
The following is an example of the code you may enter in the head section of the template:
<!-- TemplateParam name="Dept" type="number" value="1" -->
The following situation statement checks the value allocated to the Dept parameter. While the condition is matches or true, the suitable image is showed.
<!-- 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 -->
While you make a template-based document, the template parameters are mechanically passed to it. The template user decides which image to show (observe Modifying template properties in dreamweaver).
Recent Comments