1 循環的隱藏變量
<#list aaalistas 9msg>
${9msg_index}<#if 9msg_has_next>,</#if>
</#list>

這里的9msg_index為當前循環索引號。“_index”是FreeMarker中對于循環索引變量的命名約定。
通過“迭代變量名_index”即可訪問當前循環索引。 類似的循環狀態訪問約定還有“迭代變量名_has_next”,
可通過這個循環狀態屬性 判斷是否還有后繼循環。
posted on 2009-11-02 17:48
junly 閱讀(231)
評論(0) 編輯 收藏