This software allows clients to use office suite documents for templating automated document generation.
Template files may contain the following expressions.
Used to display value from the template data object.
Examples:Put a value between conditional blocks to toggle its visibility depending on a value in the data object.
Examples:Repeat a block for each item in a list in the data object.
For example if xs is a list then the following repeats the BODY part for every item: {%for x in xs%} BODY {%end%}
The BODY part has a new binding on every iteration so you can access every element in a collection via the x iterator variable.
You can call custom functions in expressions. For example: {%=coalesce(x.price, x.cost, "N/A")%}
You can also call many arithmetic operators. For example: {%= x*x+x+2%}
See: {@link stencil.functions} package.