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.
Transform.html ViewHelper <f:transform.html>
Transforms HTML and substitutes internal link scheme aspects.
Examples
Default parameters
<f:transform.html selector="a.href" onFailure="removeEnclosure">
<a href="t3://page?uid=1" class="home">Home</a>
</f:transform.html>
Copied!
Output:
<a href="https://example.com/home" class="home">Home</a>
Copied!
Inline notation
{content -> f:transform.html(selector:'a.href', onFailure:'removeEnclosure')}
Copied!
Source code
Go to the source code of this ViewHelper: HtmlViewHelper.php (GitHub).
Arguments
The following arguments are available for <f:
:
selector
-
- Type
- string
- Default
'a.
href'
Comma separated list of node attributes to be considered
onFailure
-
- Type
- string
- Default
'remove
Enclosure'
Behavior on failure, either
remove
,Tag remove
,Attr remove
orEnclosure null