---
title: "Render ViewHelper <f:render>"
manual: "Fluid ViewHelper Reference"
version: "main"
permalink: "https://docs.typo3.org/permalink/t3viewhelper:typo3-fluid-render@main"
source: "Global/Render.rst"
modified: "2026-09-17T05:12:06+00:00"
---

# Render ViewHelper `<f:render>`

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

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

> [!NOTE]
> While a partial or section can be rendered using this ViewHelper, a
> **layout** can only be included using the
> [Layout ViewHelper \<f:layout>](https://docs.typo3.org/permalink/t3viewhelper:typo3fluid-fluid-layout@main).

**Table of contents**

-   [Rendering a partial](https://docs.typo3.org/permalink/t3viewhelper:rendering-a-partial@main)
-   [Rendering a section](https://docs.typo3.org/permalink/t3viewhelper:rendering-a-section@main)
-   [Arguments of the <f:render> ViewHelper](https://docs.typo3.org/permalink/t3viewhelper:arguments-of-the-f-render-viewhelper@main)

## Rendering a partial

> [!NOTE]
> **See also**
>
> -   [Site package tutorial: The default page template](https://docs.typo3.org/m/typo3/tutorial-sitepackage/main/en-us/FluidTemplates/Index.html#default-page-template)
> -   [Override the partial template for image rendering](https://docs.typo3.org/m/typo3/tutorial-sitepackage/main/en-us/ContentElementRendering/Index.html#content-element-rendering-image)
> -   [Split up the template into partials](https://docs.typo3.org/m/typo3/tutorial-sitepackage/main/en-us/FluidTemplates/FromTheScratch.html#partials)

The render ViewHelper can be used with the argument
[partial](https://docs.typo3.org/permalink/t3viewhelper:viewhelper-argument-typo3-cms-fluid-viewhelpers-renderviewhelper-partial@main)
to render the content of a "partial". A partial is a separate Fluid file.

**packages/my_site_package/Resources/Private/PageView/Pages/Default.fluid.html**

```html
<f:render partial="Footer" arguments="{_all}"/>
```

During rendering the content of file
`packages/my_site_package/Resources/Private/PageView/Partials/Footer.fluid.html`
will be rendered with all variables that are also available in the main template.

It is possible to render a partial within a partial or layout as well. For
example the footer partial could look like this:

**packages/my_site_package/Resources/Private/PageView/Partials/Footer.fluid.html**

```
<footer class="my-footer">
    <f:render partial="Navigation/FooterMenu" arguments="{_all}"/>
</footer>
```

When the argument [partial](https://docs.typo3.org/permalink/t3viewhelper:viewhelper-argument-typo3-cms-fluid-viewhelpers-renderviewhelper-partial@main)
contains a slash `/` the partial will be searched in a subfolder. The partial
from the above example will therefore be expected in file
`packages/my_site_package/Resources/Private/PageView/Partials/Navigation/FooterMenu.fluid.html`.

### Configuring the path in which to save the partials

-   Partials used to display pages with the TypoScript object
    [PAGEVIEW](https://docs.typo3.org/m/typo3/reference-typoscript/main/en-us/ContentObjects/Pageview/Index.html#cobj-pageview) are
    always found in folder `Partials` within the path that has been defined in
    property [paths.\[priority\]](https://docs.typo3.org/m/typo3/reference-typoscript/main/en-us/ContentObjects/Pageview/Index.html#confval-pageview-paths).
-   Partials used to display content elements or pages using the TypoScript
    object [FLUIDTEMPLATE](https://docs.typo3.org/m/typo3/reference-typoscript/main/en-us/ContentObjects/Fluidtemplate/Index.html#cobj-template)
    are searched in the paths defined in property
    [partialRootPaths](https://docs.typo3.org/m/typo3/reference-typoscript/main/en-us/ContentObjects/Fluidtemplate/Index.html#confval-fluidtemplate-partialrootpaths).
-   In Extbase plugins the paths to the partials are configured in
    [plugin.tx_myextension_someplugin.view.partialRootPaths.\[priority\]](https://docs.typo3.org/m/typo3/reference-typoscript/main/en-us/TopLevelObjects/Plugin.html#confval-plugin-view-partialrootpaths).
    If not path is defined here there is a fallback to folder
    `EXT:my_extension/Resources/Private/Partials`.

## Rendering a section

When the render ViewHelper is used with the argument
[section](https://docs.typo3.org/permalink/t3viewhelper:viewhelper-argument-typo3-cms-fluid-viewhelpers-renderviewhelper-section@main)
the content of a [Section ViewHelper \<f:section>](https://docs.typo3.org/permalink/t3viewhelper:typo3fluid-fluid-section@main)
can be rendered.

**packages/my_site_package/Resources/Private/PageView/Layouts/PageLayout.fluid.html**

```html
<f:render section="SomeSection"/>

<f:section name="SomeSection">
    This is the section.
</f:section>
```

### Rendering sections in layouts

> [!NOTE]
> **See also**
>
> -   [Site Package Tutorial: The Fluid layout template](https://docs.typo3.org/m/typo3/tutorial-sitepackage/main/en-us/FluidTemplates/Index.html#layout-template)

If the section is rendered from within a layout file the section can be defined
in the template using the layout. Since usually several templates use the same
layout, it can be helpful to mark the render tag as
[optional](https://docs.typo3.org/permalink/t3viewhelper:viewhelper-argument-typo3-cms-fluid-viewhelpers-renderviewhelper-optional@main).
It is also possible to provide a default value to be displayed if the section
was not found in the template. You can use the content of the tag or the argument
[default](https://docs.typo3.org/permalink/t3viewhelper:viewhelper-argument-typo3-cms-fluid-viewhelpers-renderviewhelper-default@main).

**packages/my_site_package/Resources/Private/PageView/Layouts/PageLayout.fluid.html**

```html
<f:render section="Header" optional="true">
    <f:render partial="Header" arguments="{_all}"/>
</f:render>
<f:render section="Breadcrumb" optional="true"/>
<f:render section="Main"/>
```

In this example the templates may define a section called "Header" to override
the default header rendered from a partial.

If the template defines no section named "Breadcrumb" that section is just
ignored.

All templates have to define the section "Main" otherwise there is an error.

Template 1 just defines some content:

**packages/my_site_package/Resources/Private/PageView/Pages/Template1.fluid.html**

```html
<f:layout name="PageLayout"/>
<f:section name="Main">
    <main>Main content of Template 1</main>
</f:section>
```

**packages/my_site_package/Resources/Private/PageView/Pages/Template2.fluid.html**

```html
<f:layout name="PageLayout"/>
<f:section name="Header">
    <header>My Special header</header>
</f:section>
<f:section name="Breadcrumb">
    <f:render partial="Navigation/Breadcrumb" arguments="{_all}">
</f:section>
<f:section name="Main">
    <main>Main content of Template 1</main>
</f:section>
```

### Rendering a section from a (different) partial

If both arguments [section](https://docs.typo3.org/permalink/t3viewhelper:viewhelper-argument-typo3-cms-fluid-viewhelpers-renderviewhelper-section@main)
and [partial](https://docs.typo3.org/permalink/t3viewhelper:viewhelper-argument-typo3-cms-fluid-viewhelpers-renderviewhelper-partial@main)
are used a section found in a partial can be rendered.

## Arguments of the `<f: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

-   **debug**

    -   *Type:* boolean
    -   *Default:* true

    If true, the admin panel shows debug information if activated,

-   **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
