Uri.typolink ViewHelper <f:uri.typolink>
ViewHelper to create URIs from fields supported by the link wizard.
Go to the source code of this ViewHelper: Uri\TypolinkViewHelper.php (GitHub).
Table of contents
Example
{link} contains 19 - - - &X=y
Please note that due to the nature of typolink you have to provide a full set of parameters. If you use the parameter only, then target, class and title will be discarded.
Minimal usage
packages/my_extension/Resources/Private/Templates/Blog/Show.fluid.html
<f:uri.typolink parameter="{link}" />
Copied!
Output
/page/path/name.html?X=y
Copied!
Depending on routing and page path configuration.
Full parameter usage
packages/my_extension/Resources/Private/Templates/Blog/Show.fluid.html
<f:uri.typolink parameter="{link}" additionalParams="&u=b" />
Copied!
Output
/page/path/name.html?X=y&u=b
Copied!
Depending on routing and page path configuration.
Arguments of the <f:uri.typolink> ViewHelper
absolute
-
- Type
- bool
- Default
- false
Ensure the resulting URL is an absolute URL
addQueryString
-
- Type
- string
- Default
- false
If set, the current query parameters will be kept in the URL. If set to "untrusted", then ALL query parameters will be added. Be aware, that this might lead to problems when the generated link is cached.
addQueryStringExclude
-
- Type
- string
- Default
- ''
Define parameters to be excluded from the query string (only active if addQueryString is set)
additionalParams
-
- Type
- string
- Default
- ''
stdWrap.typolink additionalParams
language
-
- Type
- string
link to a specific language - defaults to the current language, use a language ID or "current" to enforce a specific language
parameter
-
- Type
- mixed
- Required
- 1
stdWrap.typolink style parameter string