HTML and FreeMarker for Scriptable Templates
Scriptable templates use a combination of HTML and FreeMarker code. FreeMarker is a tool that generates text output based on templates. With FreeMarker syntax, you can add dynamic variables to your HTML text that permit customized output. These variables give you more flexibility and customization than CRMSDK tags that are used in version 1 templates. For example, with scriptable templates, you can include conditions, loops, lists (arrays), and variables and define complex expressions like string operations and arithmetic calculations. You can use standard FreeMarker directives, define custom directives, and use other standard FreeMarker functions.
For complete information about using FreeMarker, see the FreeMarker website. A useful resource for user’s new to template creation, is the Template Author’s Guide.