ViewHelper Documentation


Grouped loop view helper. Loops through the specified values.

The groupBy argument also supports property paths.

= Examples =

<f:groupedFor each="{0: {name: 'apple', color: 'green'}, 1: {name: 'cherry', color: 'red'}, 2: {name: 'banana', color: 'yellow'}, 3: {name: 'strawberry', color: 'red'}}" as="fruitsOfThisColor" groupBy="color"> <f:for each="{fruitsOfThisColor}" as="fruit">


</f:for> </f:groupedFor> apple cherry strawberry banana

  • green fruits

       <li>0: apple</li>

  • red fruits

       <li>1: cherry</li>
       <li>3: strawberry</li>

  • yellow fruits

       <li>2: banana</li>


each string, required

The array or \TYPO3\CMS\Extbase\Persistence\ObjectStorage to iterated over

as string, required

The name of the iteration variable

groupBy string, required

Group by this property

groupKey string, required

The name of the variable to store the current group

ViewHelper Resources

Schema Resources