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:
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.
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
uri
-
- Type
- string
- Required
- 1
The URI that will be put in the href attribute of the rendered link tag