FreeMarker是一种用Java编写的模板引擎,负责将数据模型中的数据合并到模版中,它根据模板输出多种规格的文本,比如html,xml,java源代码。.ftl是FreeMarker模板的文件后缀名,网页模板和数据模型的结合体。
<#list typeList as menu> <#if (menu.childList?size > 0)> <b class="caret" data-toggle="collapse" data-target="#collapseOne${menu_index}"></b> <a title="${menu.sName}">${menu.sName}</a> <ul class="nav nav-pills nav-stacked collapse" id="collapseOne${menu_index}"> <#list menu.childList as child> <#if (child.childList?size>0)> <#if "${child.iAutoID}" = "${typeId}"> <li data-toggle="collapse" data-target="#collapsetwo${menu_index}${child_index}">
<a href="${contextPath}/qaUser/list.do?pageIndex=1&limit=10&type=${child.iAutoID}" title="${child.sName }">${child.sName}</a> </li> <#else> </#if> </#if> </#list> </ul> <#else> <h4 class="nav-dt"> <b class="caret uvisible" data-toggle="collapse" data-target="#collapseOne${menu_index}"></b> <a title="${menu.sName}">${menu.sName}</a> </h4> </#if> </#list>