<dpVar>
D E F I N I T I O N:
Variables allow you to create your own variables you can use within a template. Variables are usually used to save or set values you want to reference later in your template.
<dpVar variableName="value">
or
<dpVar variableName>value</dpVar>
Variable Usage:
<dpVar variableName>
A T T R I B U T E S:
Please refer to the common attributes page for additional details on the style attribute.
E X A M P L E S:
<dpVar myName="Deuteronomy">
My name is <dpVar myName>
would display
My name is Deuteronomy
<dpIf <dpColumnID>="feature">
<dpVar headerImage="cool_image.gif">
<dpElse>
<dpVar headerImage="plain_image.gif">
</dpIf>
<img src="<dpVar headerImage>">
would display cool_image.gif if it was the feature and plain_image.gif if it wasn't.
Using Styles with <dpVar>
Styles can be used with <dpVar> just as with any other display tag within Dispatch. However, you must always state the name of the variable first and then follow it with the desired styles. The following will NOT work: <dpVar style="upper" myIntro>
T A G C O D E:
Declare a variable:
<dpVar myIntro="Hello World">
or
<dpVar myIntro>Hello World</dpVar>
Apply the desired styles:
<dpVar myIntro style="upper"> - HELLO WORLD
<dpVar myIntro style="upper" style="spaced"> - H E L L O W O R L D
E F F E C T:
| Home: Support: Reference Guide: Variables & Macros: <dpVar> | Questions? Comments? Please write support@desert.net. |