Template Language

The template language has been introduced to integrate web-designed pages and extend generated HTML capabilities.

The selection criteria are:

The template language is used in templates and snippets. It is interpreted by the GWC engine, which generates HTML code. You can perform instructions ranging from simple condition tests to loop on table lines.

There are three types of items: template instructions, template expressions, and template paths.

Template instruction

A template instruction is a predefined attribute added to a HTML tag. It defines how the HTML tag is interpreted.

Syntax:
<tag gwc:instruction="expression" ... > ... </tag>
Example:
<div gwc:replace="window"></div>

The template instruction is gwc:replace. This is an instruction to replace the <div> tag with the HTML code for the current window.

Template expression

A template expression is the template instruction value. It can be a string, an operation, or a conversion function.

Example:
orientation=='horizontal'?'':' gRadioGroupVertical'

This conditional expression returns an empty string if the value of orientation path is horizontal otherwise it returns gRadioGroupVertical.

Template path

The template path is used to access an element of the current application. The element can range from the entire application window to a field value in a table.

Example:
<title gwc:content="application/ui/window/text">Title of the page</title>

The template path is application/ui/window/text, returning the title of the window.

For more information

For more information on the template language, refer to the Template Language Reference section.