OpenWGA 7.9 - WebTML reference

WebTML tags » param

<tml:param expression ="tmlscript-expression">


Calculates the parameter value from a TMLScript expression


Use this optional attribute as alternative to specifying the parameter value in the tag body. Leave the tag body empty when using it.

Using the expression attribute you can also assign non-string values to the parameter, which is neccessary for some usages.


A TMLScript expression evaluating the parameter value


A frequent use case for non-string parameters is assigning it a content document as value. This content document can be used to test the target of a content relation, like the following example demonstrates:

<tml:query type="hql">

  <tml:param name="projectdoc" expression="context('relation:target-project').content()"/>

  content.relation['parent-project'].target = :projectdoc


The parameter "projectdoc" is filled with the content document that the relation "target-project" of the current context document points to.

The query selects all documents whose relation 'parent-project' point to the document given under parameter "projectdoc".