GTL Macro Reference

Macros can be used to express template logic, and to loop on object collections. Each macro keyword must be preceded by a . (dot) character and has to be the first non blank character of a line. Make sure you also respect the macro syntax in terms of line breaks.

You define a macro inside a template, or a command entry.

There are three types of macros:

.macro-name [(parameters)]
	block-input
.endmacro-name [(tail)]
.foreach_macro-name [(parameters[,head[,tail]])]
	complex-template
.next[(separator)]
Note: Macro parameters may be delimited by double quotes. The delimiters are required whenever the parameter value includes commas, braces, leading or trailing blanks. The escape sequence for double quotes inside a parameter value is \".

The following macros are available: