<html> | |
<head> | |
<title>FreeMarker: Extended List Test</title> | |
</head> | |
<body> | |
<#assign animals = ["aardvark", | |
"kiwi", | |
"gecko", | |
"cat", | |
"dog", | |
"elephant", | |
"squirrel", | |
"zebra"]> | |
<p>A simple test follows:</p> | |
<p>${message}</p> | |
<p>A list of ${animals?size} animals follows:</p> | |
<p><#foreach animal in animals> | |
${animal}<#if animal_has_next>, <#else>.</#if> | |
</#foreach></p> | |
<p>The first animal is an ${animals?first}, and the last is a | |
${animals?last}.</p> | |
<p>The end.</p> | |
</body> | |
</html> |