Uri.email ViewHelper <f:uri.email>
¶
Deprecated since version TYPO3 v11.5
In favor of allowing more content security policy scenarios, URI
is not used anymore per default. As a result, <f:uri.email>
ViewHelper became obsolete. The ViewHelper will be removed with TYPO3 v12.0.
See Migration for details.
Email URI ViewHelper. Generates an email URI incorporating TYPO3s spamProtectEmailAddresses TypoScript setting.
Migration¶
In case config.spamProtectEmailAddresses
is used, make use of
<f.link.email email="{email}">
ViewHelper which returns the
complete <a>
tag like this:
<a href="#" data-mailto-token="ocknvq,hqqBdct0vnf"
data-mailto-vector="1">user(at)my.example(dot)com</a>
In case spam-protected is not used or not useful (for example in backend user interface), view-helper invocation can be omitted completely.
Example¶
Basic email URI:
<f:uri.email email="foo@bar.tld" />
Output:
javascript:linkTo_UnCryptMailto('ocknvq,hqqBdct0vnf');
Depending on spamProtectEmailAddresses setting.
Source code¶
Go to the source code of this ViewHelper: EmailViewHelper.php (GitHub).
Arguments¶
The following arguments are available for <f:uri.email>
:
-
email
¶ -
- Type
- string
- Required
true
The email address to be turned into a URI