Used in a callable block such as a <macro> or <view> to return data.
If you enclose any data setter tag (<int>, <str>, <list> etc.) in the return block, the result will be returned. For example, the following macro will return a list of three items:
<macro libname="get_crew"><return><list><str>John</str><str>Scorpius</str><str>Rygel</str></list></return></macro>
Alternatively, you may use the value
attribute to return the result of an expression. The following code is equivalent to the above:
<macro libname="get_crew"><return value="['John', 'Scorpius', 'Rygel']" /></macro>
name | purpose | type | required? | default | choices |
---|---|---|---|---|---|
value |
Value to return | expression | No | None |
name | purpose | type | required? | default | choices |
---|---|---|---|---|---|
if |
Conditional expression | expression | No | yes |