Attention
TYPO3 v10 has reached end-of-life as of April 30th 2023 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 v10 here: TYPO3 ELTS.
variable¶
Variable assigning ViewHelper
Assigns one template variable which will exist also after the ViewHelper is done rendering, i.e. adds template variables.
If you require a variable assignment which does not
exist in the template after a piece of Fluid code
is rendered, consider using f:alias
instead.
Usages:
{f:variable(name: 'myvariable', value: 'some value')} <f:variable name="myvariable">some value</f:variable> {oldvariable -> f:format.htmlspecialchars() -> f:variable(name: 'newvariable')} <f:variable name="myvariable"><f:format.htmlspecialchars>{oldvariable}</f:format.htmlspecialchars></f:variable>