Attention
TYPO3 v11 has reached end-of-life as of October 31th 2024 and is no longer being maintained. Use the version switcher on the top left of this page to select documentation for a supported version of TYPO3.
Need more time before upgrading? You can purchase Extended Long Term Support (ELTS) for TYPO3 v11 here: TYPO3 ELTS.
Inline ViewHelper <f:inline>
Inline Fluid rendering ViewHelper
Renders Fluid code stored in a variable, which you normally would have to render before assigning it to the view. Instead you can do the following (note, extremely simplified use case):
$view->assign('variable', 'value of my variable');
$view->assign('code', 'My variable: {variable}');
And in the template:
{code -> f:inline()}
Which outputs:
My variable: value of my variable
You can use this to pass smaller and dynamic pieces of Fluid code to templates, as an alternative to creating new partial templates.
Source code
Go to the source code of this ViewHelper: InlineViewHelper.php (GitHub).
Arguments
The following arguments are available for <f:
:
code
-
- Type
- string
Fluid code to be rendered as if it were part of the template rendering it. Can be passed as inline argument or tag content