f:uri.typolink¶
This is a viewhelper to create uris from an argument string that the link wizard (typolink) understands.
Usage¶
- Minimal usage:
<f:uri.typolink parameter="{link}" />
The result will be
index.php?id=19&X=y
when we assume that{link}
equals the string"19 - - - &X=y"
.- All parameters:
<f:uri.typolink parameter="…" additionalParams="…" useCacheHash="false" />`
Note: The string denoted by {link}
has to have the full set of parameters as expected by the
TypoScript typolink standard.
In this viewhelper the parts 'target', 'class' and 'title' will be discarded though.
Parameters¶
- parameter
| Condition: required | Type: string | Default: NULL |
The UID of the target page to link to. TypoScript syntax is expected, for example like
19 _blank
.- additionalParams
| Condition: optional | Type: string | Default: empty string |
Add more parameters to the link like ¶m=1.
- useCacheHash
| Condition: optional | Type: boolean | Default: false |
See useCacheHash
Examples¶
Example 1¶
- Code:
<f:uri.typolink parameter="{link}" additionalParams="&u=b" />
- Assumption
{link}
contains string"19 - - - &X=y"
- Output
index.php?id=19&X=y&u=b
Example 2¶
- Tag code:
<f:uri.typolink parameter="{link}" additionalParams="''"> tag content will be ignored! </f:uri.typolink>
- Inline tag:
<f:uri.typolink parameter="{link}" additionalParams="''" />
- Inline code:
{f:uri.typolink(parameter: '{link}', additionalParams: '\'\'')}