gpt4 book ai didi

freemarker - 并且在 freemarker 中

转载 作者:行者123 更新时间:2023-12-02 23:33:13 28 4
gpt4 key购买 nike

是否可以在 freemarker 中使用 and(&&) 或者是否必须使用嵌套的 if?

<#if object?exists >


</#if>

最佳答案

您可以在 Free Maker 中使用 && 作为逻辑运算符。请参阅Logical operations

例如

<#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>

关于freemarker - 并且在 freemarker 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12929312/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com