You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

TYPO3 9.5中Fluid Typolink ViewHelper忽略additionalParams属性问题咨询

Ah, I've run into this exact quirk with TYPO3 9.5's f:link.typolink before! The issue here is that the additionalParams attribute is designed primarily for internal TYPO3 page links (like linking to a page ID with extension parameters), and it won't automatically append parameters to external URLs passed in the parameter field.

Here are the straightforward solutions to get your external link working with parameters:

1. Manually Append Parameters to the External URL

The simplest fix is to directly include your parameters in the parameter value itself. Just format it like a regular external URL:

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

If you need multiple parameters, chain them with & as usual:

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

2. Dynamically Add Parameters (For Variables)

If your parameter value comes from a Fluid variable, you can concatenate it directly in the parameter attribute. Just make sure to handle URL encoding if needed:

<!-- Assuming {userIdentifier} is your dynamic variable -->
<f:link.typolink parameter="www.test-link.de?u={userIdentifier}"> Linktext </f:link.typolink>

For safer URL encoding of the parameter value, use the f:uri.url view helper:

<f:link.typolink parameter="www.test-link.de?u={f:uri.url(value: userIdentifier)}"> Linktext </f:link.typolink>

Why Your Original Code Didn't Work

To clarify: When you pass an external URL to parameter, TYPO3's underlying typolink processing treats it as a raw external target and ignores the additionalParams attribute—this attribute is reserved for adding query parameters to internal TYPO3 page routes (e.g., parameter="123" for page ID 123, plus additionalParams="&tx_myext[view]=list").

内容的提问来源于stack exchange,提问作者Achim Strohm

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.14 06:49:29