`

freemarker最常用的3个基本指令

 
阅读更多
1.if指令。
eg:
<h1>
Welcome ${user}<#if user == "yale">, our beloved
leader</#if>!
</h1>
当然啦,还有elseif,else指令等等
2.list指令
eg:
<#list users as user>
<tr><td>${user.name}</td><td>${user.pass}</td>
</#list>
3.include 指令,我们可以在当前的模板中插入其他文件的内容。
eg:
<#include "/header.html">

分享到:
评论
1 楼 song_in_china 2012-06-07  
嗯,就像EL一样

相关推荐

Global site tag (gtag.js) - Google Analytics