[TYPO3-mvc] multiple conditions in if viewhelper

Armin Rüdiger Vieweg info at professorweb.de
Fri Mar 11 01:36:03 CET 2011


> <f:if condition="{0:first, 1:second, 2:third} == {0:0, 1:0, 2:0}">
> 	<f:then>all of them 0</f:then>
> 	<f:else>at least one of them not 0</f:else>
> </f:if>

This workaround will work, but it's a very ugly solution and not flexible.
PHP Conditions like the following are currently impossible with  
IF-ViewHelper:

if ($a == 1 && $b < 2) {}

---

In comment of "evaluateBooleanExpression" stands the following which  
confirms this workaround:

We currently only support expressions of the form:
	 * XX Comparator YY
	 * Where XX and YY can be either:
	 * - a number
	 * - an Object accessor
	 * - an array
	 * - a ViewHelper


More information about the TYPO3-project-typo3v4mvc mailing list