Link.external ViewHelper <f:link.external>
A ViewHelper for creating links to external targets.
Examples
Default
<f:link.external uri="https://www.typo3.org" target="_blank">external link</f:link.external>
Copied!
Output:
<a href="https://www.typo3.org" target="_blank">external link</a>
Copied!
Custom default scheme
<f:link.external uri="typo3.org" defaultScheme="ftp">external ftp link</f:link.external>
Copied!
Output:
<a href="ftp://typo3.org">external ftp link</a>
Copied!
Source code
Go to the source code of this ViewHelper: Link\ExternalViewHelper.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.external 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.
class
-
- Type
- string
CSS class(es) for this element
data
-
- Type
- array
Additional data-* attributes. They will each be added with a "data-" prefix.
defaultScheme
-
- Type
- string
- Default
- 'https'
Scheme the href attribute will be prefixed with if specified $uri does not contain a scheme already
dir
-
- Type
- string
Text direction for this HTML element. Allowed strings: "ltr" (left to right), "rtl" (right to left)
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
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
uri
-
- Type
- string
- Required
- 1
The URI that will be put in the href attribute of the rendered link tag