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: Transform\HtmlViewHelper.php (GitHub).

Arguments

The following arguments are available for the transform.html ViewHelper:

selector
Type
string
Default
'a.href'
comma separated list of node attributes to be considered
onFailure
Type
string
Default
'removeEnclosure'
behavior on failure, either `removeTag`, `removeAttr`, `removeEnclosure` or `null`