|
You are here: Home / XT Expressions |
XT ExpressionsAssignmentsIn some XT tags, a value is being set that needs to be named. These include the <xt:loop> tag and the xt:attrs and xt:loop attributes. In these cases, the named value is prepended to the entire expression and separated from it by a space. For example: <xt:loop through="letter php: range ('a', 'z')">
<p xt:content="loop/letter/value">a</p>
</xt:loop>
As you can see, the value of each element of the expression "php: range ('a', 'z')" is assigned to the path loop/letter, since letter was specified in the initial assignment expression. ConditionsConditions are evaluated like any other expression with a couple small differences. Instead of returning the value of the expression, a condition evaluates that value to be either true or false, and the body of that condition is either shown or not shown depending on that true or false value. A condition may also be negated using a "not" key word, which has the same syntax as an assignment name. For example: <p xt:condition="php: true"> This text will show because true always evaluates to true. </p> <p xt:condition="not php: true"> This text will not show because it was negated with the "not" key word. </p> Default Types and ShorthandEach XTE expression has a default type associated with it that can be ommitted and XTE will automatically interpret the expression as beginning with that type. For example, the <xt:var name="xte path" /> command has a default type of "path", so the following are evaluated as equivalents: <xt:var name="path: object/varname" /> <xt:var name="object/varname" /> Paths can also be abbreviated if they start with "object/", so the following is also an equivalent to the two commands above: <xt:var name="varname" /> For more information about PHP shorthand, see the package saf.Misc.Shorthand in the Sitellite Application Framework (SAF) documentation. Page 1: The real power behind the XT tem... |
|
Copyright © 2009, SIMIAN systems Inc. All rights reserved. Privacy policy Some of the icons on this site were created by the Gnome Project. |