---
title: "Display Fluid ViewHelpers in reStructuredText"
manual: "How to Document"
version: "main"
permalink: "https://docs.typo3.org/permalink/h2document:viewhelper"
source: "Reference/ReStructuredText/Content/ViewHelper.rst"
rendered: "2026-09-19T10:25:29+00:00"
---

# Display Fluid ViewHelpers in reStructuredText {#viewhelper}

The special `..  typo3:viewhelper::` directive can be used to display the
information about a Fluid ViewHelper, including all arguments.

The information on the available arguments is included from a `.json` file.
See also [https://github.com/TYPO3-Documentation/fluid-documentation-generator](https://github.com/TYPO3-Documentation/fluid-documentation-generator)
on how to generate the input file.

> [!WARNING]
> Usage of the viewhelper directive outside of the
> [Fluid ViewHelper Reference](https://docs.typo3.org/other/typo3/view-helper-reference/main/en-us/Index.html#start) is still considered
> experimental.

## Example: display a ViewHelper from a JSON include {#viewhelper-example}

**Documentation/MyViewHelper.rst**

```rst
..  typo3:viewhelper:: link.external
    :source: /resources/global_viewhelpers_demo.json
```

**Documentation/resources/global_viewhelpers_demo.json**

```json

{
  "namespace": "http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers",
  "viewHelpers": {
    "split": {
      "className": "TYPO3Fluid\\Fluid\\ViewHelpers\\SplitViewHelper",
      "...": "..."
    },
    "link.external":{
      "className": "TYPO3\\CMS\\Fluid\\ViewHelpers\\Link\\ExternalViewHelper",
      "namespace": "TYPO3\\CMS\\Fluid\\ViewHelpers",
      "name": "Link\\ExternalViewHelper",
      "tagName": "link.external",
      "documentation": "A ViewHelper for creating links to external targets.\n\nExamples\n========\n...",
      "xmlNamespace": "http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers",
      "docTags": {},
      "argumentDefinitions": {
        "uri": {
          "name": "uri",
          "type": "string",
          "description": "The URI that will be put in the href attribute of the rendered link tag",
          "required": true,
          "defaultValue": null,
          "escape": null
        }
      },
      "allowsArbitraryArguments": true
    },
    "...": "..."
  }
}

```

## Properties of the `viewhelper` directive {#viewhelper-properties}

-   **\[content\]**

    -   *Type:* string

    Name of the ViewHelper as used as key in the the JSON include file.

-   **:source:**

    -   *Type:* string, local file path, relative or absolute

    Path to the source JSON file to be included. Can be relative or absolute.

    ```rst
    ..  viewhelper:: my.viewhelper
        :source: /some/absolute/path/_includes/_my_viewhelper.json

    ..  viewhelper:: my.viewhelper
        :source: ../_includes/_my_viewhelper.json
    ```

    The path is calculated starting from the `Documentation` directory.
    It is not possible to include files from different locations in an extension.

-   **:sortBy:**

    -   *Type:* string
    -   *Default:* `name`

    Ordering of the argument list.

    -   **name**

        Sort the arguments alphabetically by name

    -   **json**

        Sort the arguments in the order they appear in the JSON file.

    ```rst
    ..  typo3:viewhelper:: split
        :source: resources/global_viewhelpers_demo.json
        :sortBy: name

    ..  typo3:viewhelper:: image
        :source: resources/global_viewhelpers_demo.json
        :sortBy: json
    ```

-   **:noindex:**

    -   *Type:* bool

    If set the ViewHelper will only be displayed but cannot be linked and is not
    added to any indexes. This is useful if the same ViewHelper should be
    displayed in several places within the same document. In such a case there
    would be a clash of identifiers and warnings in the rendering if `:noindex:`
    is not set.
