[TYPO3-mvc] Iterator + check modulo

Franz Koch typo3.RemoveForMessage at elements-net.de
Wed Mar 23 15:29:33 CET 2011


Hey,

> Are you sure there is no modulo ?

no, not sure. Didn't have a look, but I thought it's not supported just 
like math operations.

> I found this in comments
>
> * <f:if condition="{rank} % 2">
> * Will be shown if rank % 2 != 0.
> * </f:if>

so why don't you use exactly this syntax? I suppose the reason why it's 
not working is that you in your snippet have two operands.

>>> <f:if condition="{iterator.index} % 4 == 0">

So you probably you have to use <f:then> and <f:else> to negate the 
condition.

<f:if condition="{iterator.index} % 4">
	<f:then>--nothing--</f:then>
	<f:else>do something</f:else>
</f:if>

-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list