---
title: "Layout ViewHelper <f:layout>"
manual: "Fluid Explained"
version: "main"
permalink: "https://docs.typo3.org/permalink/fluid:typo3fluid-fluid-layout"
source: "ViewHelpers/Fluid/Layout.rst"
rendered: "2026-09-26T08:24:58+00:00"
---

# Layout ViewHelper `<f:layout>` {#typo3fluid-fluid-layout}

> [!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/Layout.html) instead.

With this ViewHelper, you can select a layout to be used for the current template.

> [!WARNING]
> **Attention**
>
> Prevously, it was possible to set the layout of a template with the special
> variable `layoutName`. This is no longer possible with Fluid 5.

## Examples {#examples}

```php
<f:layout name="main" />

```

Output:

```php
(no output)
```

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

**Arguments**

The following arguments are available for the layout ViewHelper:

-   **name**

    -   *Type:* string

    Name of layout to use. If none given, "Default" is used.
