[TYPO3-mvc] FLUID: extended loop features

Martin Kutschker masi-no at spam-typo3.org
Wed Jan 6 18:52:36 CET 2010


Sebastian Kurfürst schrieb:
> Hi,
> 
> if you do:
> <f:for each="{...}">
>   <f:cycle values="{0: 'odd', 1: 'even'}" />
> </f:for>
> Then it will output "odd" "even" "odd" "even" as often as there are
> elements in the loop. Isn't that what you want? :-)

Then this isn't clear from the examples given in the docs for the view helper.

> (Exactly: The f:cycle has an internal counter which counts how often the
> specific _instance_ of the f:cycle VH has been called)

For my current use cases this is probably sufficient. Can anyone think of an example where it might
be useful to let the counter be set from the outside?

Masi


More information about the TYPO3-project-typo3v4mvc mailing list