---
title: "GroupedFor ViewHelper <f:groupedFor>"
manual: "Fluid ViewHelper Reference"
version: "13.4"
permalink: "https://docs.typo3.org/permalink/t3viewhelper:typo3fluid-fluid-groupedfor@13.4"
source: "Global/GroupedFor.rst"
modified: "2026-09-17T09:07:45+00:00"
---

# GroupedFor ViewHelper `<f:groupedFor>`

Grouped loop ViewHelper.
Loops through the specified values.

The groupBy argument also supports property paths.

Using this ViewHelper 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).

Go to the source code of this ViewHelper: [GroupedForViewHelper.php (GitHub)](https://github.com/TYPO3/Fluid/blob/main/src/ViewHelpers/GroupedForViewHelper.php).

## Arguments of the `<f:groupedFor>` ViewHelper

-   **as**

    -   *Type:* string
    -   *Required:* true

    The name of the iteration variable

-   **each**

    -   *Type:* array
    -   *Required:* true

    The array or \\SplObjectStorage to iterated over

-   **groupBy**

    -   *Type:* string
    -   *Required:* true

    Group by this property

-   **groupKey**

    -   *Type:* string
    -   *Default:* 'groupKey'

    The name of the variable to store the current group
