牛骨文教育服务平台(让学习变的简单)
博文笔记

freemarker的<#list>标签的用法。

创建时间:2016-10-13 投稿人: 浏览次数:1288

译自:http://freemarker.org/docs/pgui_datamodel_directive.html#autoid_37

例子:

输入:

foo
<@upper>
  bar
  <#-- All kind of FTL is allowed here -->
  <#list ["red", "green", "blue"] as color>
    ${color}
  </#list>
  baaz
</@upper>
wombat

输出:

foo
  BAR
    RED
    GREEN
    BLUE
  BAAZ
wombat

此处还有自定义指令的内容,详情参照官网说明。




声明:该文观点仅代表作者本人,牛骨文系教育信息发布平台,牛骨文仅提供信息存储空间服务。