[TYPO3-mvc] FLUID: if condition with string

Christian Zenker christian.zenker at 599media.de
Thu Feb 24 12:14:09 CET 2011


On Thu, 24 Feb 2011 08:54:43 +0100, Peter Niederlag <typo3-list at niekom.de>  
wrote:

>
> It is a really badly missign feature that is driving me nuts sometimes.  
> :-<
>
> Franz Koch once posted a switch/case ViewHelper that I am using when  
> needing to compare strings...

Hi Peter.

I usually do it this way (little hacky, but it works with fluids standard  
viewHelpers):

<f:alias map="{foobar: 'myString'}"><f:if condition="{object.property} ==  
{foobar}"><!-- do something --></f:if></f:alias>

Christian.


More information about the TYPO3-project-typo3v4mvc mailing list