GTL supports macros to express template logic, and to loop on object collections. Macro keywords are prefixed by a . (dot) character, which must be the first non-blank character in the line, and you must respect the use of line breaks in the macro syntax.
.if Macro - evaluates conditions.
.foreach_item Macro – iterates on object collections.
.foreach_line Macro – iterates on lines of a multi-line text block.
.foreach_part Macro – iterates on parts of a string.
.break Macro – breaks a loop.
Formatting and string manipulation macros:
.lowercase and .uppercase Macros - change the case of a text block.
.convert_name and .convert_code Macros - convert codes into names or names into codes.
.delete and .replace Macros - perform operations on substrings.
.unique Macro - filters redundant lines from a text block.
.block Macro - adds a header and a footer to a text block.
Generation command macros - for use when writing GTL in the context of the execution of a generation command:
.vbscript Macro - embed VB script code inside a template.
.execute_vbscript Macro - launch vbscripts.
.execute_command Macro - launch executables.
.abort_command Macro - stop command execution.
.change_dir and .create_path Macros - change directory or create a path.
.log Macro - write log messages.
Miscellaneous macros:
.set_object, .set_value, and .unset Macros - create local objects or variables.
.comment and .// Macro - inserts a comment in a template.
.object and .collection Macros - returns a collection of objects based on the specified scope and condition.
.object and .collection Macros - return an object or collection based on the specified scope and condition.
.bool Macro - evaluates a condition.
.set_interactive_mode Macro – defines whether the GTL execution must interact with the user.