<#ftl stripText=false> <#-- Free marker demo --> <#comment> This demonstrates the FreeMarker language. The default theme is not very colorful and displays many different token types in the same color, but keep in mind that you can define your own theme (or extend an existing one). Note that free marker actually defines 6 similar but different syntax modes: - 3 tag syntax modes: Angle (<#if>), Bracket ([#if]), and Auto. - 2 interpolation modes: Dollar (${...}) and Bracket ([=...]) In auto mode, the first tag determines the tag syntax. You can use the language IDs "freemarker.tag-bracket.interpolation-dollar" etc. to force a specific mode. The default FreeMarker mode is Angle/Dollar. <#macro greet name> Hello [=name]! <#macro border>

<#nested>

<#function avg x y> <#return (x + y) / 2> <#assign user = "Juila Smith"> <#assign animals = [{"name": "Tanuki", "price": 200}, {"name": "Phoenix", "price": 1111}]>
<#-- Greet the user with his/her name -->

# <@greet user />

We have these animals:

<#list animals as animal>
- [=animal.name] for [=animal.price] Euros

<@border>The bordered text The average of 35 and 49 is [=avg(35, 49)].