一、显示日期
1、选择显示格式
${(model.date?string("HH:mm"))!}
2、常规显示
${(model.date?date)!}
${(model.date?datetime)!}
二、空字符串,空Map
<#if form.id?has_content>
<a type="button" class="btn btn-warning catrgory-remove">删除</a>
</#if>
2、<#assign selected = (orientationId?? && ms.id==orientationId)?string("selected='selected'","") />
<option value="${ms.id}" ${selected}>${ms.name}</option>
<#list (incubationTeamSearcher.industries)! as ind>
<#if ind==i>
<#assign check="checked">
</#if>
</#list>
<input type="checkbox" ${check} value="${i!}" name="industries" />${i}
</#list>
<a type="button" class="btn btn-warning catrgory-remove">删除</a>
</#if>
<#assign pictureId=product.pictureIds?has_content?string(product.pictureIds[0],"")/>
三、便利Map
<#list map?keys as key>
${key}=${map[key]}<br />
</#list>
四、全局验证
<#escape x as (x)!>
</#escape>
五、Select默认选中
1、${(a.id=(t.orientation.id!))?string('selected="selected"','')}
<option value="${ms.id}" ${selected}>${ms.name}</option>
3、
<#list (industries)! as i>
<#assign check=""/>
<#list (incubationTeamSearcher.industries)! as ind>
<#if ind==i>
<#assign check="checked">
</#if>
</#list>
<input type="checkbox" ${check} value="${i!}" name="industries" />${i}
</#list>