Documentation · ViewHelper reference

Link / EmailViewHelper


Email link view helper.
Generates an email link incorporating TYPO3s spamProtectEmailAddresses-settings. = Examples
  • Tag usage example

    <f:link.email additionalAttributes="{foo: 'bar'}" data="{foo: 'bar'}" email="foo" class="NULL" dir="NULL" id="NULL" lang="NULL" style="NULL" title="NULL" accesskey="NULL" tabindex="123" onclick="NULL" name="NULL" rel="NULL" rev="NULL" target="NULL">
    	<!-- tag content - may be ignored! -->
    </f:link.email>
  • Inline usage example

    {f:link.email(additionalAttributes: {foo: 'bar'}, data: {foo: 'bar'}, email: 'foo', class: 'NULL', dir: 'NULL', id: 'NULL', lang: 'NULL', style: 'NULL', title: 'NULL', accesskey: 'NULL', tabindex: 123, onclick: 'NULL', name: 'NULL', rel: 'NULL', rev: 'NULL', target: 'NULL')}

Arguments

Argument Description Type
accesskey

Keyboard shortcut to access this element

string
additionalAttributes

Additional tag attributes. They will be added directly to the resulting HTML tag.

array
class

CSS class(es) for this element

string
data

Additional data-* attributes. They will each be added with a "data-" prefix.

array
dir

Text direction for this HTML element. Allowed strings: "ltr" (left to right), "rtl" (right to left)

string
email

The email address to be turned into a link.

string
id

Unique (in this file) identifier for this HTML element.

string
lang

Language for this element. Use short names specified in RFC 1766

string
name

Specifies the name of an anchor

string
onclick

JavaScript evaluated for the onclick event

string
rel

Specifies the relationship between the current document and the linked document

string
rev

Specifies the relationship between the linked document and the current document

string
style

Individual CSS styles for this element

string
tabindex

Specifies the tab order of this element

integer
target

Specifies where to open the linked document

string
title

Tooltip text of element

string
Required attribute

Revision history

commit 27bbf6507db26ae9d53054ce908df203beefc3c8
Author: Bastian Waidelich <*****@typo3.org>
Date:   Sat May 16 18:43:53 2009 +0000

    tx_fluid:
     * !!!changed view helpers once again!!! link view helpers reside in the link subfolder now. For each link view helper there is a corresponding uri helper now. Check out https://svn.typo3.org/TYPO3v4/CoreProjects/MVC/viewhelpertest for a working example.
     * TagBuilder->setContent does not apply htmlspecialchar() on the the tag contents, as that does not really makes sense - if you really need to escape tag contents, you gotta do it yourself now.

commit 50af6b9c08d04e3e1d4ce56a499a9a3d4b84efc3
Author: Sebastian Kurfürst <*****@typo3.org>
Date:   Thu May 28 21:45:46 2009 +0000

    Fluid:
    * Backported major changes from Fluid v5 to Fluid v4
    * !!! Many of these changes are not backwards-compatible! Please read this if you have written custom ViewHelpers!
    * Introduced Shorthand Syntax for calling ViewHelpers
    * Core:
    ** Lots of internal cleanup and refactorings.
    ** !!! Complete restructuring into subpackages.
    * ViewHelpers:
    ** !!! The base classes of ViewHelpers changed to Tx_Fluid_Core_ViewHelper_AbstractViewHelper and Tx_Fluid_Core_ViewHelper_TagBasedViewHelper. Please adjust your ViewHelpers!
    ** !!! $this->variableContainer has been renamed to $this->templateVariableContainer
    ** !!! the view is not in $this->variableContainer anymore. Currently there is no way to fetch the View from a ViewHelper.
    ** Introduced a new $this->controllerContext containing the context variables of the controller
    ** !!! The request can be now found in $this->controllerContext->getRequest()
    ** !!! The URIHelper has been renamed to URIBuilder and can be now found in $this->controllerContext->getURIBuilder()
    ** Introduced a new ViewHelperVariableContainer, available in $this->viewHelperVariableContainer to pass data between ViewHelpers. Should only be needed in very rare cases.
    ** !!! Removed <f:format.htmlEscape> ViewHelper! Please remove these declarations in your template! Escaping of object accessors is now automatically done, see next point.
    * !!! ObjectAccessors {...} are now automatically HTMLspecialChar'd if not used as an argument to a ViewHelper. This is done using a new ObjectAccessorPostProcessor. Lateron, this will be made configurable.

commit a737739af5637ab6b5a19cfd7eb41d646b4c020c
Author: Bastian Waidelich <*****@typo3.org>
Date:   Thu Sep 17 12:44:23 2009 +0000

    [+FEATURE] Fluid (Viewhelpers): Added backend mode support for view helpers base, cObject, format.crop (partly), link.email, translate (partly), uri.email. Now only image- and renderFlashMessages view helpers are not working in BE

commit df94c3e60a018ac1ad145e9df96e763a015ccf04
Author: Bastian Waidelich <*****@typo3.org>
Date:   Wed Oct 21 16:02:16 2009 +0000

    [+BUGFIX] Fluid: register universal tag attributes in link.email view helper. This resolves #5069.
    [+TASK] Fluid: added some standard tag attributes to link.email, link.action and link.external view helpers (backported from v5)

commit 186bdaeac89820779f91853b830cc95d60c7ad58
Author: Bastian Waidelich <*****@typo3.org>
Date:   Tue Jul 13 09:42:26 2010 +0000

    [-TASK] Fluid: R*****@version annotation from all Fluid classes to ease the backporting process. Relates to #8835 (backported from Fluid package)

commit 1d36de6ed90007e324b773782e8f0a1d1c1191a2
Author: Bastian Waidelich <*****@typo3.org>
Date:   Tue Jul 13 10:12:30 2010 +0000

    [-TASK] Fluid: R*****@package/@subpackage annotations from all Fluid classes. They have already been removed in FLOW3 packages in r2813.

commit 2bd9f56a7a820e303cc9ad9900557edb677136a8
Author: Bastian Waidelich <*****@typo3.org>
Date:   Tue Jul 13 14:17:07 2010 +0000

    [+BUGFIX] Fluid: Replaced SplObjectStorage by Tx_Extbase_Persistence_ObjectStorage to be PHP 5.2-compatible (which ships with a broken implementation of SplObjectStorage)
    [!!!][~TASK] Fluid (Core): Renamed ConditionViewHelper and TagBasedViewHelper to Abstract*ViewHelper as per CGL. (backported from Fluid package r4840). To be backwards-compatible, TagBasedViewHelper.php still exists and will write an entry to TYPO3s deprecation log if used. Please adapt your custom ViewHelpers and inherit from AbstractTagBasedViewHelper instead of TagBasedViewHelper. This resolves #8834
    [~TASK] Fluid: Marked vfs unit tests to be skipped, as vfs is not part of v4 (yet)

commit dd8928aed4c119d8db37322acb91ded24ba5cc35
Author: Bastian Waidelich <*****@typo3.org>
Date:   Thu Dec 30 16:21:11 2010 +0000

    [+TASK] Fluid (ViewHelpers): Fix, cleanup and extend inline documentation of ViewHelpers
    
    Resolves #10908

commit dec6fa3cdd65f7e2a8fc01d53b57a85c01130e08
Author: Franz Koch <*****@elements-net.de>
Date:   Fri Jan 21 18:00:20 2011 +0000

    [+TASK] Fluid (ViewHelpers): fixed typo in doc comment examples of emailViewhelper

commit 91ede1eb3b00e4e72c0cb5d74ffd7f5dd60f1782
Author: Sebastian Kurfuerst <*****@typo3.org>
Date:   Mon Jun 20 06:18:30 2011 +0200

    [+BUGFIX] Empty a tag ends with /> instead of </a>
    
    Change-Id: I209783b91247ae615e9b944665d67c230b861637
    Resolves: #27556

commit fd09d197fa8886b97cb20aa9573f39cd08ce989e
Author: Bastian Waidelich <*****@typo3.org>
Date:   Thu Nov 10 18:27:58 2011 +0100

    [TASK] S*****@author annotations
    
    This backports three recent changes of the TYPO3.Fluid package:
    - R*****@license annotation from files (290f4f5)
    - Simplify license header in PHP files (14bacba)
    - D*****@author tags from source code (9c2e837)
    
    This should not contain any functional change!
    
    Change-Id: I9376dca4af78c4f0f82413011d115b8ad04634dd

commit ec3891d8d4e339d8319428211207e6201be9fd73
Author: Thomas Maroschik <*****@dfau.de>
Date:   Wed Oct 17 21:18:26 2012 +0200

    [TASK][WIP] Move non class code back to source files
    
    Change-Id: I620d2e61860142cdc89cc83474c95542799961c0

commit 554e8f890dcc0dd86a27518b58e2b54be26fd37e
Author: Thomas Maroschik <*****@dfau.de>
Date:   Wed Oct 17 22:20:17 2012 +0200

    [TASK] Namespace classes
    
    Change-Id: Ia7432e1c923826ed58206bca15fb94509adbd508

commit 282cb87cde59e6cee64c09810e0347e89722c5c9
Author: Ingo Pfennigstorf <*****@gmail.com>
Date:   Fri Sep 7 16:50:18 2012 +0200

    [BUGFIX] Escaping E-Mail addresses conflicts with spam protection
    
    In case spamProtectEmailAddresses = ascii is enabled via TypoScript
    E-Mail Addresses will now be displayed correctly in the frontend.
    The link.email ViewHelper does not escape the added attributes.
    
    Change-Id: Ib5d7639cb12fbcd4d90ecfa39fb7d2576ed3cb87
    Fixes: #7453
    Releases: 1.3, 1.4, 4.7, 6.0
    Reviewed-on: http://review.typo3.org/14438
    Reviewed-by: Alexander Schnitzler
    Tested-by: Alexander Schnitzler
    Reviewed-by: Anja Leichsenring
    Tested-by: Anja Leichsenring

commit 9d46e6932d35c79bf87c96fa38b8e537c4192f23
Author: Alexander Schnitzler <*****@typovision.de>
Date:   Tue Nov 20 16:27:02 2012 +0100

    [CLEANUP] Adjust code to CGL and fix small namespace bugs
    
    * whitespaces, tabs and blank line issues
    * bool -> boolean
    * int -> integer
    * fix wrong namespace annotations
    
    Fixes: #43157
    Releases: 6.0
    Change-Id: I8397948e19248db029d8efd1555ee56e4982742d
    Reviewed-on: http://review.typo3.org/16619
    Reviewed-by: Helmut Hummel
    Tested-by: Helmut Hummel

commit 77f29a3c69a7cbb27b34072754aa503bace6c9f1
Author: Christian Kuhn <*****@schwarzbu.ch>
Date:   Tue Oct 1 14:40:56 2013 +0200

    [TASK] Remove closing PHP tags
    
    Change-Id: Iaa92566c53301e49396fc9fb26b0b339c48d567b
    Resolves: #52360
    Releases: 6.2
    Reviewed-on: https://review.typo3.org/24212
    Reviewed-by: Christian Kuhn
    Tested-by: Christian Kuhn
    Reviewed-by: Ernesto Baschny
    Tested-by: Ernesto Baschny
    Reviewed-by: Anja Leichsenring
    Tested-by: Anja Leichsenring