2012-10-17 7 views
6

freemarkerで(& &)を使用することは可能ですか?入れ子にしなければならないのですか?freemarkerで

<#if object?exists > 


</#if> 
+3

は、あなたがそれを試してみましたたとえばLogical operations

を参照してください? – Dirk

答えて

24

あなたは自由メーカーに& &などの論理演算子を使用することができます。

<#if x < 12 && color = "green"> 
    We have less than 12 things, and they are green. 
</#if> 
<#if !hot> <#-- here hot must be a boolean --> 
    It's not hot. 
</#if>