OpenWGA 7.8 - WebTML reference

Item Expressions

System provided item expressions

The following item expressions are provided by the OpenWGA system

  • $cx - access the current TMLContenxt (same as "this" in TMLScript)
  • $form - access proerties of the current TMLForm object (like $form.formid)
  • $portlet - access the current portlet object
  • $request_<metaname> - access to properties of META "request"
  • $cookie_<name> - a cookie object with the specified name
  • $option_<name> - an TML option with given name
  • $field_<fieldname> - Value of a WebTML form field
  • $fieldList_<fieldname> - Value of a WebTML form field in list form
  • $item_<itemname> - Value of a WebTML item
  • $itemList_<itemname> - Value of a WebTML item in list form
  • $urlParam_<name> - Value of an URL parameter
  • $tagInfo_<tagid>_<infoname> - Some WebTML tag info from the current page
  • $is_selected
  • $is_maindocument
  • $is_firstloop / $is_lastloop
  • $is_root
  • $is_browserinterface
  • $is_anonymous

Samples:

Shows a login form if the current user is anonymous:

<tml:form if="$is_anonymous">
   ... a login form
</tml:form>

Renders a child navigator if the current context is selected:

<tml:children if="$is_selected"> ... </tml:children>

Uses $taginfo_... to output the number of results of a query and outputs a error message if there was an error:

<tml:query id="q">...</tml:query>

<tml:item name="$tagInfo_q_count"/> documents found


<tml:{div} html_class="error" if="$tagInfo_q_error">

    The following error occurred: <tml:item name="$tagInfo_q_error"/>

</tml:{div}>