Use custom Fluid ViewHelpers in Neos Flow without import statement

Use custom Fluid ViewHelpers without having to import the namespace first

When using the Fluid rendering engine together with Neos Flow, you can use Fluid’s built in and your own custom viewhelpers.

Fluid ViewHelpers are by default available with the <f:[viewhelper-name]> syntax – such as < date="{dateObject}">. This syntax is possible because, the f namespace is automatically imported.

But with the Neos Flow adaptor for Fluid, the ViewHelpers of all packages is available in the syntax


In this case vendor.package is the package name.


Create a ViewHelper named HelloWorldViewHelper, located in the Classes/ViewHelpers/ folder.

copy/paste the code here


namespace Vendor\Package\ViewHelpers;

use Neos\FluidAdaptor\Core\ViewHelper\AbstractViewHelper;

class MenuViewHelper extends AbstractViewHelper
    public function render()
        return 'Hello world';

Now, enter the following HTML on your Fluid Template

<vendor.package:helloWorld />

And you will have the output Hello world

You can add arguments, rendering of children elements and everything you want.