[TYPO3-mvc] FLUID condition does not work with true/false

Bastian Waidelich bastian at typo3.org
Fri Aug 6 11:50:10 CEST 2010


Michael Knoll wrote:

Hi Michael,

> <f:if condition="{filter.validate} == false">
> <div style="color: red">Validation Error: {filter.errorMessage}</div>
> </f:if>

"false" is (not yet) a Fluid keyword. See http://forge.typo3.org/issues/5158

That's why it's interpreted as string.. And that's why it doesn't work 
(http://forge.typo3.org/issues/6757)

if http://forge.typo3.org/issues/5485 is resolved, you won't need this 
in this case but could write:
<f:if condition="!{filter.validate}">

For now the only solution I can think of is...

<f:if condition="{filter.validate}">
   <f:else>
     <div style="color: red">Validation Error: {filter.errorMessage}</div>
   </f:else>
</f:if>

Best,
Bastian


More information about the TYPO3-project-typo3v4mvc mailing list