.. include:: /Includes.rst.txt
.. _typo3fluid-fluid-groupedfor:
==========
groupedFor
==========
Grouped loop view helper.
Loops through the specified values.
The groupBy argument also supports property paths.
= Examples =
{fruit.name}
Note: Using this view helper can be a sign of weak architecture. If you end up using it extensively
you might want to fine-tune your "view model" (the data you assign to the view).
Arguments
=========
.. _groupedfor_each:
each
----
:aspect:`DataType`
mixed
:aspect:`Required`
true
:aspect:`Description`
The array or \SplObjectStorage to iterated over
.. _groupedfor_as:
as
--
:aspect:`DataType`
string
:aspect:`Required`
true
:aspect:`Description`
The name of the iteration variable
.. _groupedfor_groupby:
groupBy
-------
:aspect:`DataType`
string
:aspect:`Required`
true
:aspect:`Description`
Group by this property
.. _groupedfor_groupkey:
groupKey
--------
:aspect:`DataType`
string
:aspect:`Default`
'groupKey'
:aspect:`Required`
false
:aspect:`Description`
The name of the variable to store the current group