Use ternary operator in freemarker?

后端 未结 5 1027
忘了有多久
忘了有多久 2021-02-01 12:54

I just want to do something like this:


5条回答
  •  渐次进展
    2021-02-01 13:33

    Using Interpolation syntax:

    "${(a?has_content)?string('a.htm','b.htm')}"
    

    has_content : can be used to handle STRING (returns FALSE in case of empty string)

提交回复
热议问题