OpenWGA 7.6 - OpenWGA Concepts and Features

Design and development » WebTML » Features » Labels

Label parameters

Label may contain dynamic parameters. Label parameters are special text chunks inside the text of a labels whose contents is not predefined but will be filled on each individual usage via WebTML functionality. This makes it possible to define labels for text parts that are generally homogenous but vary in certain positions.

The parameters that a label can receive must be defined in the label text by using the notation {1} to {5]:

cannotfind=The document of name {1} can not be found!


When using this label with <tml:label> then the attributes param1...param5 fill the defined parameters with actual values:

<tml:label key="cannotfind" param1="home"/>


Resulting in the label output:

The document of name home can not be found!

Notations of parameters in labels whose values are not filled on usage are simply removed.

The TMLScript pendant this.label() is also able to specify parameter values via its "params" argument.