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

# Alias ViewHelper `<f:alias>` {#typo3fluid-fluid-alias}

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

Declares new variables which are aliases of other variables.
Takes a "map"-Parameter which is an associative array which defines the shorthand mapping.

The variables are only declared inside the `<f:alias>...</f:alias>` tag. After the
closing tag, all declared variables are removed again.

Using this ViewHelper can be a sign of weak architecture. If you end up
using it extensively you might want to fine-tune your "view model" (the
data you assign to the view).

## Examples {#examples}

### Single alias {#single-alias}

```php
<f:alias map="{x: 'foo'}">{x}</f:alias>

```

Output:

```php
foo

```

### Multiple mappings {#multiple-mappings}

```php
<f:alias map="{x: foo.bar.baz, y: foo.bar.baz.name}">
    {x.name} or {y}
</f:alias>

```

Output:

```php
[name] or [name]

```

Depending on `{foo.bar.baz}`.

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

**Arguments**

The following arguments are available for the alias ViewHelper:

-   **map**

    -   *Type:* array
    -   *Required:* true

    Array that specifies which variables should be mapped to which alias
