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.
Property additionalAttributes
All Fluid ViewHelper that create exactly one HTML tag, tag-based ViewHelpers,
can get passed the property additional
.
A tag-based Fluid ViewHelper generally supports most attributes that are
also available in HTML. There are, for example, the attributes class
and
id
, which exists in all tag-based ViewHelpers.
Sometimes attributes are needed that are not provided by the ViewHelper. A common example are data attributes.
<f:form.textbox additionalAttributes="{data-anything: 'some info', data-something: some.variable}" />
The property additional
are especially helpful if only a
few of these additional attributes are needed. Otherwise, it is often
reasonable to write an own ViewHelper which extends the corresponding
ViewHelper.
The property additional
is provided by the
Tag
so it is also available to custom ViewHelpers
based on this class. See chapter Developing a custom ViewHelper.