update
Former-commit-id: bdede6ed1b6f578f2ef046c338caf02d0b29d453 [formerly 7187de361b53e9c8ec121df379b762f2db736ea2] Former-commit-id: 447d58460fbbfd05ffe08428a1288e392637561d
This commit is contained in:
46
_embed/public/ace/demo/kitchen-sink/docs/ftl.ftl
Normal file
46
_embed/public/ace/demo/kitchen-sink/docs/ftl.ftl
Normal file
@@ -0,0 +1,46 @@
|
||||
<#ftl encoding="utf-8" />
|
||||
<#setting locale="en_US" />
|
||||
<#import "library" as lib />
|
||||
<#--
|
||||
FreeMarker comment
|
||||
${abc} <#assign a=12 />
|
||||
-->
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en-us">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
|
||||
<title>${title!"FreeMarker"}<title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<h1>Hello ${name!""}</h1>
|
||||
|
||||
<p>Today is: ${.now?date}</p>
|
||||
|
||||
<#assign x = 13>
|
||||
<#if x > 12 && x lt 14>x equals 13: ${x}</#if>
|
||||
|
||||
<ul>
|
||||
<#list items as item>
|
||||
<li>${item_index}: ${item.name!?split("\n")[0]}</li>
|
||||
</#list>
|
||||
</ul>
|
||||
|
||||
User directive: <@lib.function attr1=true attr2='value' attr3=-42.12>Test</@lib.function>
|
||||
<@anotherOne />
|
||||
|
||||
<#if variable?exists>
|
||||
Deprecated
|
||||
<#elseif variable??>
|
||||
Better
|
||||
<#else>
|
||||
Default
|
||||
</#if>
|
||||
|
||||
<img src="images/${user.id}.png" />
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user