Feature: #92338 - Allow link text wrapping in TypolinkViewhelper¶
See forge#92338
Description¶
Using the f:link.typolink
ViewHelper for generating links to internal
pages does now allow to wrap the automatically rendered link title, which
is usually the page title of the target page.
Therefore a new argument textWrap
is available, which can be used to
define the wrap
setting for the typolink.
Defining <f:link.typolink parameter="123" textWrap="<span>|</span>"/>
will generate <a href="some/site"><span>My page title</span></a>
.
Note
When adding additional classes to the textWrap
, ensure quotes are correctly
escaped: <f:link.typolink parameter="123" textWrap="<span class=\"my-class\">|</span>"/>
.
If textWrap
is set, the typolink option ATagBeforeWrap
is automatically
enabled, because the wrap
should only be applied to the link text. Every
other use case can be handled in the fluid template itself.
Impact¶
It's now possible with the f:link.typolink
ViewHelper, to wrap the
automatically generated link text, e.g. when linking to an internal page.