OpenWGA 7.6 - OpenWGA Concepts and Features

Design and development » WebTML » Features » Scriptlets

Scriptlet level 1

Scriptlet level 1 allows basic functionality quite frequently needed in authoring, like requesting data of the context document and the execution of "scriptlet macros", which offer a  range of functionality predefined either by OpenWGA or an OpenWGA design.

The resolving of scriptlets of this level is active on:

  • The output of an item, edited with the rich text editor, via <tml:item editor="rtf">. So scriptlet level 1 is automatically activated for items edited with the rich text editor (that internally uses scriptlets for some functions itself)
  • The output of any other text with the WebTML encoder "rtf" via <tml:item encode="rtf"/>


The following syntaxes are available:

Requesting values of content items:

{@#itemname@}


Requesting values of metadata fields of type "content" (like known from <tml:metadata>):

{@$metaname@}


Calling "Scriptlet macros":

{@!macroname [:parameter, parameter, ...]@}

The scriplet macros that are available are documented in the WebTML reference under WebTML scriptlets.

The scriptlet level 1 only allows operations that should be generally safe to use by authors. This however may depend on the custom scriptlets that are available via OpenWGA design. The scriptlets predefined by OpenWGA are all provide read-only operations that only involve the current context document.

If a scriptlet is the only content on a text row and is immediately preceded or followed by a HTML carriage return tag <br>, then these carriage returns are removed from output. This happens to remove those carriage returns that are only added to the text to highlight the usage of the scriptlet and should not influence the layout.