<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> <#-- FreeMarker samples --> <#import "lib-datetime.ftl" as dt> <#import "lib-string.ftl" as str>

${title}

<@widget name="test" />

${i18n().dates}

${i18n().formatted_date_time}

${dt.xsdDateTimeToYear(xsddatetime)}

${i18n().apples}

${i18n().fruit}

${i18n().animal} ${animal}

${i18n().book_title} ${bookTitle}

${i18n().zoo_one}

${i18n().zoo_two}

${i18n().berries} ${berries}

${year?number?c}

${i18n().raw_string_literals}

${r"#{title}"}

${r"${title}"}

${i18n().containers_do_not_pick_up_changes}

<#assign fruit = ["apples", "oranges", "bananas"] veg = ["beans", "peas", "carrots"] food = [fruit, veg] fruit = fruit + ["pears"] > <#noparse> <#assign
fruit = ["apples", "oranges", "bananas"]
veg = ["beans", "peas", "carrots"]
food = [fruit, veg]
fruit = fruit + ["pears"]
>

${i18n().list_elements_of} ${r"${fruit}"}

<#list fruit as f> ${f}

${i18n().list_elements_of} ${r"${food}"}: ${i18n().contains_no_pears}

<#list food as item> <#list item as i> ${i}

${i18n().numbers}

<#assign one = 1 two = 2 numbers = [one, two] two = 20 numbers2 = [one, two] > <#noparse> <#assign
one = 1
two = 2
numbers = [one, two]
two = 20
numbers2 = [one, two]
>
${r"${two}"}: ${two}
${r"${numbers[1]}"}: ${numbers[1]}
${r"${numbers2[1]}"}: ${numbers2[1]}

${i18n().undo_camelcasing}

<#assign s1 = "FreemarkerTest"> ${s1} => ${str.unCamelCase(s1)}
<#assign s2 = "Freemarker"> ${s2} => ${str.unCamelCase(s2)}
<@dump var="now" /> <@dump var="urls" /> <@dump var="fruit" /> <@dump var="trueStatement" /> <@dump var="zoo1" /> ${scripts.add('', '', '')} <@dumpAll /> <@help for="dump" /> <@help for="profileUrl" />