Fluid Typolink ViewHelper忽略了额外的Params属性

时间:2019-08-19 14:35:55

标签: typo3 fluid typo3-9.x typolink

我想通过f:link.typolink-ViewHelper创建带有参数的外部页面链接。 ViewHelper创建链接,但没有我的参数。我使用了TYPO3文档(https://docs.typo3.org/other/typo3/view-helper-reference/9.5/en-us/typo3/fluid/latest/Link/Typolink.html)中的示例。我正在使用TYPO3 9.5。我是否需要其他配置?

<f:link.typolink parameter="www.test-link.de" additionalParams="&u=b">
   Linktext
</f:link.typolink>

2 个答案:

答案 0 :(得分:2)

正确的写法是:

additionalParams="{name: 'value'}"

您甚至可以像这样组合多个参数:

additionalParams="{name: 'value', anotherName: 'anotherValue'}"

答案 1 :(得分:0)

无需附加参数即可工作

<f:link.typolink parameter="www.test-link.de?u=b" >
   Linktext
</f:link.typolink>

仅供参考, additionalParams 对我也不起作用。所以我做了上面的

更新: https://docs.typo3.org/other/typo3/view-helper-reference/10.4/en-us/typo3/fluid/latest/Link/Typolink.html

处存在文档错误

方法是@Scopestyle 建议的