String values and numerical values
You can place string values or numerical values anywhere in your Adobe Dreamweaver Template.
- String values
-
String values can be any literal string or variable that represents a string, or any combination of the two. For example,
<h2>@@Component.Title@@</h2>consists of the literal string<h2>, the string variableComponent.Title, and the literal string</h2>. - Numerical values
-
Numerical values can be any number or variable that represents a number, or any compound numerical expression that evaluates to a number. Compound numerical expressions must be enclosed in variable delimiters, and can use the arithmetic and bitwise operators: the unary operators
+,-, and~, as well as the binary operators+,-,&,|,^,*,/,%,<<and>>. For example, the following are all valid numerical values:42@@Component.Fields.Address.HouseNumber + 4@@@@Component.SocialSecurityNumber@@
Note that
@@Component.Fields.Address.HouseNumber@@ + 4would display the value of theComponent.Fields.Address.HouseNumberfield, followed by the literal string" + 4". - Getting a Boolean, numerical or string value
-
You can also obtain a Boolean, numerical or string value by using the ternary operator
? :that takes three operands: a Boolean expression, a result value if the expression evaluates totrue, and a result value if the expression evaluates tofalse. For example, if thePage.Titlevariable is equal to"Latest News", the following expression results in the string value"News Page", otherwise it results in the string value"Other Page":@@(Page.Title == "Latest News" ? "News Page" : "Other Page")@@