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

# Else ViewHelper `<f:else>` {#typo3fluid-fluid-else}

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

Else-Branch of a condition. Only has an effect inside of `f:if`.
See the `f:if` ViewHelper for documentation.

## Examples {#examples}

### Output content if condition is not met {#output-content-if-condition-is-not-met}

```php
<f:if condition="{someCondition}">
    <f:else>
        condition was not true
    </f:else>
</f:if>

```

Output:

```php
Everything inside the "else" tag is displayed if the condition evaluates to false.
Otherwise, nothing is outputted in this example.
```

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

**Arguments**

The following arguments are available for the else ViewHelper:

-   **if**

    -   *Type:* boolean

    Condition expression conforming to Fluid boolean rules
