[FLOW3-general] Multiple conditions in if view helper

Bastian Waidelich bastian at typo3.org
Tue Oct 16 15:24:53 CEST 2012


David Sporer wrote:

Hi David

> What I want to do is something like this:
> If($mystring!=='value1' || $mystring!=='value2')


> <f:if condition="{0: object.field, 1: object.field } == {0: 'value1', 1:
> 'value2'}">

This would be similar to ($object->getField() == 'value1' && 
$object->getField() == 'value2')

> Is this possible with Fluid?

It is not (yet) possible to use "complex" expressions for boolean 
arguments (see [1]).

Usually if you have a requirement like this, it makes sense to adjust 
the domain model though.
The example is a bit abstract though, what exactly do you want to achieve?


[1] http://forge.typo3.org/issues/33394


-- 
Bastian Waidelich
TYPO3 Core Team Member

TYPO3 .... inspiring people to share!
Get involved: typo3.org


More information about the FLOW3-general mailing list