[TYPO3-mvc] How to use If-ViewHelper with other than true/false
Steffen Kamper
info at sk-typo3.de
Sun Jun 7 22:47:03 CEST 2009
Hi,
Joerg Schoppet schrieb:
> Hi,
>
> Steffen Kamper schrieb:
>> Hi,
>>
>>>
>>> when you look to source you'll find this:
>>>
>>> * <f:if condition="somecondition">
>>> * This is being shown in case the condition matches
>>> * </f:if>
>>>
>>> so syntax should be
>>> <f:if condition="{product.abc == 1}">
>>>
> Not working :-(
>
>> looking again i found out that the class
>> Tx_Fluid_ViewHelpers_ThenViewHelper is missing, so no if-condition
>> will work!
> Don't know what you mean, but Then-ViewHelper is there !?!
me too - i used wron search pattern, sry
looking deeper i found the method evals this: convertArgumentValue in
ViewHelperNode.php
So i think you only can check
<f:if condition="{product.abc}">
for 0 (false) and any other value.
The if / else if with eval expressins like a == b seems not implemented.
vg Steffen
More information about the TYPO3-project-typo3v4mvc
mailing list