[FLOW3-general] Multiple conditions in if view helper

David Sporer david.sporer at gmail.com
Thu Oct 18 07:52:42 CEST 2012


Hi Bastian,

I have a Form where I'm displaying fields. Every field has a field type
assigned.
If a field has a certain field type I need to display additional input
fields.

Don't know if I'm clear enough - it's about Passbook passes
(http://portal.passbooks.de).
Normal fields contain only one value - special fields must also contain a
label, a change message and a key value.

Best regards and thanks for your answer
David

-----Ursprüngliche Nachricht-----
Von: flow3-general-bounces at lists.typo3.org
[mailto:flow3-general-bounces at lists.typo3.org] Im Auftrag von Bastian
Waidelich
Gesendet: Dienstag, 16. Oktober 2012 15:25
An: flow3-general at lists.typo3.org
Betreff: Re: [FLOW3-general] Multiple conditions in if view helper

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
_______________________________________________
FLOW3-general mailing list
FLOW3-general at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/flow3-general



More information about the FLOW3-general mailing list