OpenWGA 7.5 - WebTML reference
WebTML tags<tml:option>
Description :This tag either defines (sets) or reads (gets) WebTML options.
This tag is used inside <tml:include> or <tml:element> to parametrize the WebTML module/element to include.
The name of the option to get or set is specified by the attribute "name". If you want to set an option then you should specify the option value either within the content of the <tml:option> tag or by using attribute "expression", which lets you specify the option value by TMLScript expression.
If no option value is determined, because the tag has no content and the attribute "expression" is not used, then <tml:option> assumes the reading mode. The tag will return the value that is stored in the option of the given name as result.
Another way to determine the operation mode is attribute mode where you can specify to get or set an option explicitly.
show inherited attributes ... | |||
Name | Value(s) | Purpose | |
default | defaultstring |
Sets a default string value to be returned when the option does not exist |
|
defaultexpression | tmlscript-expression | Calculate a default value by TMLScript that is to be returned when the option does not exist | |
expression | tmlscript-expression |
The result of the specified TML script expression will be used as option value. |
|
mode | get | set |
Defines the mode of the option tag. |
|
name | option-name | Specifies the name of the option to set or read. | |
scope | global | local |
Specifies the scope of this option for included TML modules. |
Details:
<tml:include ref="navigation">
<tml:option name="color">red</tml:option>
</tml:include>
The following may be the code of module "navigation" which reads the option color by using <tml:option> in get mode:
<div style="background-color:<tml:option name="color"/>">
...</div>