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