---
title: "Render ViewHelper <f:render>"
manual: "Fluid Explained"
version: "main"
permalink: "https://docs.typo3.org/permalink/fluid:typo3fluid-fluid-render"
source: "ViewHelpers/Fluid/Render.rst"
rendered: "2026-10-08T14:12:40+00:00"
---

# Render ViewHelper `<f:render>` {#typo3fluid-fluid-render}

> [!NOTE]
> This reference is part of the documentation of Fluid Standalone.
> If you are working with Fluid in TYPO3 CMS, please refer to
> [TYPO3's ViewHelper reference](https://docs.typo3.org/other/typo3/view-helper-reference/14.3/en-us/Global/Render.html) instead.

A ViewHelper to render a section, a partial, a specified section in a partial
or a delegate ParsedTemplateInterface implementation.

## Examples {#examples}

### Rendering partials {#rendering-partials}

```php
<f:render partial="SomePartial" arguments="{foo: someVariable}" />

```

Output:

```php
the content of the partial "SomePartial". The content of the variable {someVariable} will be available in the partial as {foo}

```

### Rendering sections {#rendering-sections}

```php
<f:section name="someSection">This is a section. {foo}</f:section>
<f:render section="someSection" arguments="{foo: someVariable}" />

```

Output:

```php
the content of the section "someSection". The content of the variable {someVariable} will be available in the partial as {foo}

```

### Rendering recursive sections {#rendering-recursive-sections}

```php
<f:section name="mySection">
    <ul>
        <f:for each="{myMenu}" as="menuItem">
            <li>
                {menuItem.text}
                <f:if condition="{menuItem.subItems}">
                    <f:render section="mySection" arguments="{myMenu: menuItem.subItems}" />
                </f:if>
            </li>
        </f:for>
    </ul>
   </f:section>
   <f:render section="mySection" arguments="{myMenu: menu}" />

```

Output:

```php
<ul>
    <li>menu1
        <ul>
          <li>menu1a</li>
          <li>menu1b</li>
        </ul>
    </li>
[...]
(depending on the value of {menu})

```

### Passing all variables to a partial {#passing-all-variables-to-a-partial}

```php
<f:render partial="somePartial" arguments="{_all}" />

```

Output:

```php
the content of the partial "somePartial".
Using the reserved keyword "_all", all available variables will be passed along to the partial

```

### Rendering via a delegate ParsedTemplateInterface implementation w/ custom arguments {#rendering-via-a-delegate-parsedtemplateinterface-implementation-w-custom-arguments}

```php
<f:render delegate="My\Special\ParsedTemplateImplementation" arguments="{_all}" />

```

This will output whichever output was generated by calling `My\Special\ParsedTemplateImplementation->render()`
with cloned RenderingContextInterface $renderingContext as only argument and content of arguments
assigned in VariableProvider of cloned context. Supports all other input arguments including
recursive rendering, contentAs argument, default value etc.

Note that while ParsedTemplateInterface supports returning a Layout name, this Layout will not
be respected when rendering using this method. Only the `render()` method will be called!

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

**Arguments**

The following arguments are available for the render ViewHelper:

-   **arguments**

    -   *Type:* array
    -   *Default:* array (
    )

    Array of variables to be transferred. Use {\_all} for all variables

-   **contentAs**

    -   *Type:* string

    If used, renders the child content and adds it as a template variable with this name for use in the partial/section

-   **default**

    -   *Type:* mixed

    Value (usually string) to be displayed if the section or partial does not exist

-   **delegate**

    -   *Type:* string

    Optional PHP class name of a permanent, included-in-app ParsedTemplateInterface implementation to override partial/section

-   **optional**

    -   *Type:* boolean
    -   *Default:* false

    If true, considers the \*section\* optional. Partial never is.

-   **partial**

    -   *Type:* string

    Partial to render, with or without section

-   **section**

    -   *Type:* string

    Section to render - combine with partial to render section in partial
