f:link.typolink¶
A ViewHelper to create links from fields supported by the link wizard.
Properties¶
The UniversalTagAttributes Global properties of the HTML element
Plus:
parameter¶
- Variable type
- String
- Description
- UID of the target page to link to.
TypoScript-Syntax is expected like
19 _blank
. See typolink - Default value
- NULL
- Mandatory
- Yes
target¶
- Variable type
- String
- Description
- What Window shall be used to open the link?
- Default value
- Empty string
- Mandatory
- No
class¶
- Variable type
- String
- Description
- The class to be added to the link.
- Default value
- Empty string
- Mandatory
- No
title¶
- Variable type
- String
- Description
- The title attribute of the link.
- Default value
- Empty string
- Mandatory
- No
additionalParams¶
- Variable type
- String
- Description
- Add more parameters to the link. Opposed to
arguments
these names will not be prefixed with the extension name. - Default value
- Empty string
- Mandatory
- No
additionalAttributes¶
- Variable type
- Array
- Description
- To add attributes to the 'ATag'. The array will automatically be converted to TypoScript syntax Param1=Wert Param2=Wert
- Default value
- Empty array
- Mandatory
- No
Example¶
Fluid
<f:link.typolink parameter="{link}">Linktext</f:link.typolink>
We assume that {link}
has the string value 19 _blank - "testtitle with whitespace" &X=y
.
The linkwizzard in the backend for example uses strings like this.
Result
<a href="index.php?id=19&X=y" title="testtitle with whitespace" target="_blank">Linktext</a>
Full configuration
<f:link.typolink parameter="{link}" target="_blank" class="ico-class"
title="some title" additionalParams="&u=b" additionalAttributes="{type:'button'}"
>Linktext</f:link.typolink>
Result
<a href="index.php?id=19&X=y&u=b" title="some title" target="_blank"
class="ico-class" type="button">Linktext</a>