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 exist 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
is 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.