adding samples

This commit is contained in:
edendramis
2015-10-15 14:43:02 -07:00
parent 1f1416a5f7
commit 11e3251efd
2 changed files with 42 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
<#import "layout.ftl" as layout>
<#assign results = [
{
"title": "Example Result",
"description": "Lorem ipsum dolor sit amet, pede id pellentesque, sollicitudin turpis sed in sed sed, libero dictum."
}
] />
<@layout.page title="FreeMarker Example">
<#if results?size == 0>
There were no results.
<#else>
<ul>
<#list results as result>
<li>
<strong>${result.title}</strong>
<p>${result.description}</p>
</li>
</#list>
</ul>
</#if>
<@currentTime />
</@layout.page>
<#macro currentTime>
${.now?string.full}
</#macro>

View File

@@ -0,0 +1,12 @@
<#macro page title>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>${title}</title>
</head>
<body>
<#nested />
</body>
</html>
</#macro>