Link.email ViewHelper <f:link.email>
¶
Email link ViewHelper. Generates an email link incorporating TYPO3s spamProtectEmailAddresses TypoScript setting.
Examples¶
Basic email link¶
<f:link.email email="foo@bar.tld" />
Copied!
Output:
<a href="#" data-mailto-token="ocknvq,hqqBdct0vnf" data-mailto-vector="1">foo(at)bar.tld</a>
Copied!
Depending on spamProtectEmailAddresses setting.
Email link with custom linktext¶
<f:link.email email="foo@bar.tld">some custom content</f:link.email>
Copied!
Output:
Email link with custom subject and prefilled cc¶
<f:link.email email="foo@bar.tld" subject="Check out this website" cc="foo@example.com"">some custom content</f:link.email>
Copied!
Output:
<a href="mailto:foo@bar.tld?subject=Check%20out%20this%20website&cc=foo%40example.com">some custom content</a>
Copied!
Depending on spamProtectEmailAddresses setting.
Source code
Go to the source code of this ViewHelper: Link\EmailViewHelper.php (GitHub).
Arguments
Allows arbitrary arguments
This ViewHelper allows you to pass arbitrary arguments not defined below directly
to the HTML tag created. This includes custom
data-
arguments.
The following arguments are available for the link.email ViewHelper:
-
accesskey
¶ -
- Type
- string
Keyboard shortcut to access this element
-
additionalAttributes
¶ -
- Type
- array
Additional tag attributes. They will be added directly to the resulting HTML tag.
-
aria
¶ -
- Type
- array
Additional aria-* attributes. They will each be added with a "aria-" prefix.
-
bcc
¶ -
- Type
- string
The email address(es) for BCC of the email link
-
body
¶ -
- Type
- string
A prefilled body for the email link
-
cc
¶ -
- Type
- string
The email address(es) for CC of the email link
-
class
¶ -
- Type
- string
CSS class(es) for this element
-
data
¶ -
- Type
- array
Additional data-* attributes. They will each be added with a "data-" prefix.
-
dir
¶ -
- Type
- string
Text direction for this HTML element. Allowed strings: "ltr" (left to right), "rtl" (right to left)
-
email
¶ -
- Type
- string
- Required
- 1
The email address to be turned into a link
-
id
¶ -
- Type
- string
Unique (in this file) identifier for this HTML element.
-
lang
¶ -
- Type
- string
Language for this element. Use short names specified in RFC 1766
-
name
¶ -
- Type
- string
Specifies the name of an anchor
-
onclick
¶ -
- Type
- string
JavaScript evaluated for the onclick event
-
rel
¶ -
- Type
- string
Specifies the relationship between the current document and the linked document
-
rev
¶ -
- Type
- string
Specifies the relationship between the linked document and the current document
-
style
¶ -
- Type
- string
Individual CSS styles for this element
-
subject
¶ -
- Type
- string
A prefilled subject for the email link
-
tabindex
¶ -
- Type
- integer
Specifies the tab order of this element
-
target
¶ -
- Type
- string
Specifies where to open the linked document
-
title
¶ -
- Type
- string
Tooltip text of element