[英]Typo3 Fluid <f:if> always returning true
i want to do an "f:if condidtion={}" Command in my Fluid Template but it always returns true, always: My Example:我想在我的流体模板中执行“f:if condidtion={}”命令,但它总是返回 true,总是:我的示例:
<f:if condition="{2 == 3}">
<f:then>
*returned true.. do something*
</f:then>
<f:else>
*returned false.. do something else*
</f:else>
</f:if>
As you can cleary see, it has to be false because 2:= 3 but my f.if always returns true?如您所见,它必须为假,因为 2:= 3 但我的 f.if 总是返回真? Anyone got an Idea?
有人有想法吗?
Greetings BMR问候 BMR
{...}
tries to use a variable or ViewHelper by that name. {...}
尝试使用该名称的变量或 ViewHelper。 As there is none called 2 == 3
, it keeps the string {2 == 3}
which is (after type juggling) trueish
.由于没有所谓的
2 == 3
,它保留字符串{2 == 3}
(在类型杂耍之后) trueish
。
You should use 2 == 3
or rather {myVar} == 3
.您应该使用
2 == 3
或者更确切地说{myVar} == 3
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.