<li class="<#if (position.flag)! =='haha1'>hide<#else >show</#if>"><a href=" ">按钮name</a></li>
<li class="<#if (position.flag)! =='haha1'>hide</#if>"><a href=" ">按钮name</a></li>
boolean 判断: class="${(obj.isShow||obj.isShow!=null)?string('disable','enable')} show" //默认false(class="show") //http://jxdwuao.iteye.com/blog/1037462
<#if qqList??> : 判断这个变量是否存在;
freemarker 判断list记录大于0:
freemarker 判断list记录大于0 用<#if (list?size > 0)></#if>即可。下面是个显示附件的实例 <#if (post.attachments?has_content)> <#if post.attachments?size gt 0> <#if (post.attachments?size > 0)> <#else> </#if>
布尔类型判断(已自测!):
<section data-need="${(userListItem.isAdmin)?string('true','false')}">