OpenWGA 7.11 - TMLScript reference

TMLContext "this"
Method :


On object TMLContext "this"
Usage Retrieves a WebTML tag information object

This method is the TMLScript pendant of <tml:metadata type="taginfo"/> and is used to retrieve information fields from WebTML tags, called "tag infos".

tag() returns a TagInfo object and you can access the actual info values via properties:


The tagInfo objects represents the addressed TMLTag. Typically you will retrieve a tag by id. Without an id parameter the current tag is addressed - typically the <tml:script> tag containing the code.

The TagInfo object has a method parent([tagname]) to address the direct parent tag or any parent tag in the hierarchy with the given tagname.


Will address the next <tml:include> tag in the parent hierarchy.

Parameters tagid (String) opitonal:

ID of the tag to retrieve tag information from. If no tagid is given the current tag is addressed (typically the current <tml:script> tag).

Return value A tag information object.
Allowed in script types
  • WebTML pages and normal WebTML actions




    Documents found: <tml:script expression="tag().parent('collection').count"/>


Will output the number of results without using an "id" attribute.