[TYPO3-english] v4.3: String Comparisons using Fluid IfViewHelper seem not to work correctly

Susanne Moog typo3 at susannemoog.de
Sat Dec 5 08:29:22 CET 2009


Hi,

Christine Gerpheide schrieb:
> Hi,
> 
> I'm relatively new to Fluid and I'm having trouble doing string comparisons
> with the IfViewHelper.  I would like to be able to evaluate a condition
> like:
> "{foo.title} == 'Test Title'" .  However, this seems to always return true
> instead of evaluating the left against the right.  Is this the correct
> syntax?
> 
> These conditions return true, when I wouldn't expect them to:
> 
> <f:if condition="9 == '8'">
> <f:if condition="'snth' == 'aoeu'">
> <f:if condition="snth == aoeu">
> <f:if condition="{foo.title} == 'Test Title'">
> 
> Anyone know how I can do this (particularly the last one)? I am using Fluid
> 1.0.2 and Extbase 0.9.11 on TYPO3 4.3beta1.

Try looking into the thread with the subject "How to use If-ViewHelper
with other than true/false" on  the TYPO3 MVC list
<http://lists.typo3.org/pipermail/typo3-project-typo3v4mvc/2009-June/000328.html>

HTH,

Susanne


More information about the TYPO3-english mailing list