---
title: "Feature ViewHelper <f:feature>"
manual: "Fluid ViewHelper Reference"
version: "main"
permalink: "https://docs.typo3.org/permalink/t3viewhelper:typo3-fluid-feature@main"
source: "Global/Feature.rst"
rendered: "2026-09-26T06:08:28+00:00"
---

# Feature ViewHelper `<f:feature>` {#typo3-fluid-feature}

ViewHelper to check if a feature flag is enabled, implemented as a condition like an "if" construct.

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

**Table of contents**

-   [Examples](https://docs.typo3.org/permalink/t3viewhelper:examples@main)
-   [Arguments of the <f:feature> ViewHelper](https://docs.typo3.org/permalink/t3viewhelper:arguments-of-the-f-feature-viewhelper@main)

## Examples {#typo3-fluid-feature-example}

### Basic usage {#typo3-fluid-feature-basic-usage}

**packages/my_extension/Resources/Private/Templates/Blog/List.fluid.html**

```html
<f:feature name="myFeatureFlag">
  This is being shown if the flag is enabled
</f:feature>
```

### Feature / then / else {#typo3-fluid-feature-feature-then-else}

**packages/my_extension/Resources/Private/Templates/Blog/List.fluid.html**

```html
<f:feature name="myFeatureFlag">
  <f:then>
    Flag is enabled
  </f:then>
  <f:else>
    Flag is undefined or not enabled
  </f:else>
</f:feature>
```

## Arguments of the `<f:feature>` ViewHelper {#typo3-fluid-feature-arguments}

-   **else**

    -   *Type:* mixed

    Value to be returned if the condition if not met.

-   **name**

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

    name of the feature flag that should be checked

-   **then**

    -   *Type:* mixed

    Value to be returned if the condition if met.
