[TYPO3-mvc] Condition in if-ViewHelper quesion
Thomas Hempel
thomas at typo3-unleashed.net
Tue Aug 24 15:24:26 CEST 2010
Hi,
I'm currently trying to understand how the the if-ViewHelper works.
Unfortunately I can't find the place where the condition argument is
parsed and checked. Can somebody please point me to a direction?
The background for this question is that I pass a negative value to a
variable and check that in an condition. The weird thing is, that the
result is always true. I somehow think that the value is not treated as
integer but as a simple string.
Here is what I mean:
In the controller:
$this->view->assign('value', -1);
In the Fluid template:
{value}
<f:if condition="{value} > -1">
<f:then>
is greater than -1
</f:then>
<f:else>
is smaller or even -1
</f:else>
</f:if>
The result is:
-1 is greater than -1
Greets,
Thomas
More information about the TYPO3-project-typo3v4mvc
mailing list