Bug #92527
closedf:link.typolink does not respect additionalParams
0%
Description
The `additionalParams` parameter in the `typolink` viewhelper is not respected.
Using the example from the [documentation](https://docs.typo3.org/other/typo3/view-helper-reference/10.4/en-us/typo3/fluid/latest/Link/Typolink.html) it returns the following link:
<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>
This translates to
<a href="myfile.doc" title="some title" target="_blank" class="ico-class" type="button">Linktext</a>
The `u=b` is not added to the link.
Debugging the variable `$typoLinkParameter` in the viewhelper (line 130) retuns
file:1414 _blank ico-class "some title" &u=b
Updated by Riccardo De Contardi over 3 years ago
- Status changed from New to Needs Feedback
I am looking at https://stackoverflow.com/questions/57558916/fluid-typolink-viewhelper-ignores-additionalparams-attribute)
and I wonder if the documentation is correct...
could you try with:
additionalParams="{name: 'value'}"
Id est:
<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>
Updated by Chris no-lastname-given over 3 years ago
In the meantime, this issue seems to be fixed. With TYPO3 10.4.14 it is all working, like described in the documentation. So the following is right:
additionalParams="&u=b"
This issue can be closed.
Updated by Chris no-lastname-given over 3 years ago
One additional note:
If you link to a file (parameter="t3://file?uid=8"), the "additionalParams" is not respected, but I guess, this is expected behaviour.
Updated by Riccardo De Contardi over 3 years ago
- Status changed from Needs Feedback to Closed
@Chris no-lastname-given thank you for your findings
Closing the issue.