Attention
TYPO3 v9 has reached its end-of-life September 30th, 2021 and is not maintained by the community anymore. Looking for a stable version? Use the version switch on the top left.
You can order Extended Long Term Support (ELTS) here: TYPO3 ELTS.
link.typolink¶
A ViewHelper to create links from fields supported by the link wizard
Example¶
{link}
contains: t3://page?uid=2&arg1=val1#9 _blank some-css-class "Title containing Whitespace"
.
Or a legacy version from older TYPO3 versions:
{link}
contains: 9 _blank - "testtitle with whitespace" &X=y
.
Minimal usage¶
<f:link.typolink parameter="{link}">
Linktext
</f:link.typolink>
Output:
<a href="/page/path/name.html?X=y" title="testtitle with whitespace" target="_blank">
Linktext
</a>
Depending on current page, routing and page path configuration.
Full parameter usage¶
<f:link.typolink parameter="{link}" additionalParams="&u=b"
target="_blank"
class="ico-class" title="some title"
additionalAttributes="{type:'button'}"
useCacheHash="true"
>
Linktext
</f:link.typolink>
Output:
<a href="/page/path/name.html?X=y&u=b" title="some title" target="_blank" class="ico-class" type="button">
Linktext
</a>
Depending on routing and page path configuration.