<#macro greet> <font size="+2">hello joe!</font> </#macro> <#macro greet person> <font size="+2">hello ${person}!</font></#macro> <@greet person="fred"/> and <@greet person="batman"/> <font size="+2">hello fred!</font> and <font size="+2">hello batman!</font> <#macro greet person color> <font size="+2" color="${color}">hello ${person}!</font></#macro> <@greet person="fred" color="black"/> <@greet color="black" person="fred"/> <@greet person="fred" color="black" background="green"/> <@greet person="fred"/> <#macro greet person color="black"> <font size="+2" color="${color}">hello ${person}!</font></#macro> <#macro border> <table border=4 cellspacing=0 cellpadding=4><tr><td> <#nested> </tr></td></table> </#macro> <@border>the bordered text</@border> <table border=4 cellspacing=0 cellpadding=4><tr><td> the bordered text </tr></td></table> <#macro do_thrice> <#nested> <#nested> <#nested> </#macro> <@do_thrice> anything. </@do_thrice> anything. anything. anything. <@border> <ul> <@do_thrice> <li><@greet person="joe"/> </@do_thrice> </ul> </@border> <table border=4 cellspacing=0 cellpadding=4><tr><td> <ul> <li><font size="+2">hello joe!</font> <li><font size="+2">hello joe!</font> <li><font size="+2">hello joe!</font> </ul> </tr></td></table> <#macro repeat count> <#local y = "test"> <#list 1..count as x> ${y} ${count}/${x}: <#nested> </#list> </#macro> <@repeat count=3>${y?default("?")} ${x?default("?")} ${count?default("?")}</@repeat> test 3/1: ? ? ? test 3/2: ? ? ? test 3/3: ? ? ? |