f:link.typolink¶
A ViewHelper to create links from fields supported by the link wizard.
Properties¶
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
addQueryString¶
- Variable type
- Boolean
- Description
- If set, the current query parameters will be kept in the URI.
- Default value
- FALSE
- Mandatory
- No
addQueryStringMethod¶
- Variable type
- String
- Description
If set to GET or POST, then the parsed query arguments (GET or POST data) will be used. This setting is useful, if you use URL processing extensions like Real URL, which translate part of the path into query arguments.
It’s also possible to get both, POST and GET data, on setting this to
“POST,GET” or “GET,POST”. The last method in this sequence takes precedence and overwrites the parts that are also present for the first method.
- Default value
- GET
- Mandatory
- No
addQueryStringExclude¶
- Variable type
- Boolean
- Description
- List of query arguments to exclude from the link. Typical examples are ‘L’ or ‘cHash’.
- Default value
- Empty string
- Mandatory
- No
absolute¶
- Variable type
- Boolean
- Description
- If set, the URI of the rendered link is absolute.
- Default value
- GET
- Mandatory
- No
Example¶
<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>
<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>