Feature #7389

GroupedForViewHelper group by object

Added by Lienhart Woitok almost 12 years ago. Updated over 11 years ago.

Should have
Target version:
Start date:
Due date:
% Done:


Estimated time:
Has patch:


Currently it is not possible to group by an object.

Example :

class Foo {
    /** @return array<Bar> */
    public function getBars();

class Bar {
    /** @return Baz */
    public function getBaz();

class Baz {

Now, lets loop over them using the Baz objects as key.

<f:groupedFor each="{foo.bars}" as="bars" groupBy="baz" groupKey="baz">
        <f:for each="{bars}" as="bar">

I expected output from this loop, something like

    A crazy baz title:
            <li>A named bar</li>
            <li>Another named bar</li>
    Second crazy baz title:
            <li>A further named bar</li>
            <li>And yet another named bar</li>
            <li>The last named bar</li>

I got nothing. So I dug into this and created the attached patch, enabling the expected behavior.


fluid-GroupedForViewHelper-objectAsKey.diff (1.48 KB) fluid-GroupedForViewHelper-objectAsKey.diff Lienhart Woitok, 2010-04-20 16:02
7389_v2_FLOW3.patch (6.51 KB) 7389_v2_FLOW3.patch 2nd version of this patch (FLOW3 package) Bastian Waidelich, 2010-05-17 11:39
7389_v2_typo3v4.patch (6.5 KB) 7389_v2_typo3v4.patch 2nd version of this patch (extension) Bastian Waidelich, 2010-05-17 11:39

Updated by Bastian Waidelich over 11 years ago

  • Project changed from 534 to TYPO3.Fluid

Updated by Bastian Waidelich over 11 years ago

  • Category set to ViewHelpers
  • Status changed from New to Accepted
  • Assignee set to Bastian Waidelich
  • Priority changed from Could have to Should have
  • Branch set to v4 + v5

Note: I just moved this issue from "Extbase MVC Framework" to "Fluid" - the patch is created against the v4 extension. I'll take care of this


Updated by Bastian Waidelich over 11 years ago

Can someone please double check the attached patches so they can be committed


Updated by Bastian Waidelich over 11 years ago

  • Status changed from Needs Feedback to Resolved
  • % Done changed from 0 to 100

Applied in changeset r4620.

Also available in: Atom PDF