freemarker if else 判断使用与其他标签含义

一:[#if list?? && (list?size gt 0)] 内容   [/#if]//list不为空并且list的size大于0

二:[#if list?? && list?size gt 0 ]   内容 [#elseif  list?? && list?size == 0 ]  内容[/#if] //elseif部分判断

三:[#list list as current]  //相当于for循环current为当前list中的对象

四:[#if hlist?? && hlist?size gt 0]
             [#list hlist as h]${h.name}[#if h_has_next]内容[/#if][/#list]//判断list还有下一个
       [/#if]

五:[#include 'inc/inc_column_head.ftl' /]  //相当于html中的include

六:<#if str == "1">   //等于判断

<#if str !== "1">    //非等于判断

七:[#list list as current]  ${current_index}    list遍历中的下标序号

你可能感兴趣的:(freemarker if else 判断使用与其他标签含义)