幸福是把溫暖的槍

          FreeMaker學(xué)習(xí)筆記

          1.${data model} 類似于jsp的<%=data model%><%=data model%>

          2.JTL tag:以#開頭,除了某些特定的tag會以@開頭(用戶自定義的tag)

          3.注釋:<#-- 注釋內(nèi)容-->

          4.幾個(gè)tag的例子
           
              <#if condition> 內(nèi)容</#if>

            <#else>  

            例子:
           
           <#if animals.python.price < animals.elephant.price>
             Pythons are cheaper than elephants today.
           <#else>
          

          Pythons are not cheaper than elephants today.

          </#if> 


















            循環(huán)讀取數(shù)據(jù)

          <#list SequenceVar as variable>repeatThis</#list>





          <#list animals as being>

            ${being.name}${being.price}
            </#list>

           





          <#list whatnot.fruits as fruit>

          ${fruit}
            </#list>

          插入文件中的內(nèi)容
          <#include "filename">


           

          posted on 2005-09-16 13:42 幸福是把溫暖的槍 閱讀(516) 評論(0)  編輯  收藏 所屬分類: java

          主站蜘蛛池模板: 晋中市| 德安县| 崇仁县| 旅游| 宜川县| 呼图壁县| 获嘉县| 东平县| 华宁县| 浦城县| 富蕴县| 太原市| 获嘉县| 建宁县| 彭州市| 游戏| 台中市| 含山县| 博兴县| 萍乡市| 栾川县| 通化县| 土默特左旗| 江安县| 花垣县| 株洲市| 平阳县| 黄龙县| 常山县| 含山县| 买车| 威海市| 阳城县| 武穴市| 新晃| 无为县| 涿州市| 衡阳县| 白山市| 岳池县| 略阳县|