OpenWGA 5.0 - WebTML reference


WebTML scriptlets

WebTML scriptlets are special text parts that may be embedded to OpenWGA rich text fields. When the field is rendered they are dynamically calculated producing a result that replaces them on output.

There are a variety of different scriptlets providing different types of calculations:

 {@$Metaname@} {@$Metatype:Metaname@}

Output of a metadata field of the current context document. See the WebTML metadata reference for available metadata field names. The variant without parameter "Metatype" retrieves a metadata field of type "content".

 {@#Itemname@}

Output of an item of the current context document.

 {@!CustomScriptlet [:Parameter, Parameter, ...]@}

Executes a custom scriptlet which may be predefined in the applications design as TMLScript module under base name "scriptlets:". Replace "CustomScriptlet" with the continued name of the TMLScript module after this base name. Some custom scriptlets may expect parameters that you specify after a colon and separate individual parameters by commas.

 {@!contenturl:Documentkeyl@} {@!contenturl:DBKey, Documentkey@}

Generates a URL to a content document. Specify the document to point to in the parameters. Parameter "documentkey" accepts content keys, page/struct keys or unique names. The first variant points to documents in the current context application, on the second variant you can specify the application to point to.

 {@!div:CSS-Class@}

Produces an HTML <div> tag of the given CSS class

 {@!_div@} 

Produces an HTML <div> close tag

 {@!filelink:File@} {@!filelink:Container, File@} {@!filelink:Container, File, Title@}

Generates a complete HTML link to a file attachment. You can specify the container holding the file (a key of a content document or a name of a file container), the file name and a title. Omitting the title will use the file name as title. Omitting the container will point to a file attachment on the current context document.

 {@!fileurl:File@} {@!fileurl:Container, File@}

Generates a URL to a file attachment. You can specify the container holding the file (a key of a content document or a name of a file container) and the file name. Omitting the container will point to a file attachment on the current context document.

 {@!label:Key@} {@!label:File, Key@} {@!label:Container, File, Key@}

Returns a WebTML label. Parameter container, file and key have the same functionality as the equally named attributes on WebTML tag <tml:label>.

 {@!namedcontenturl:Uniquename@} {@!namedcontenturl:DBKey,Uniquename@}

Generates an URL to a content document based solely on its unique name. Other than !contenturl the resulting URL uses only the given name to address the document. Omit parameter dbkey to point to a named document on the same application.

 {@!span:CSS-Class@}

Produces an HTML <span> tag of the given CSS class

  {@!_span@}

Produces an HTML <span> close tag