【问题标题】:Fluid Typolink ViewHelper ignores additionalParams-attributeFluid Typolink ViewHelper 忽略附加参数属性
【发布时间】:2019-08-19 14:35:55
【问题描述】:

我想通过 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>

【问题讨论】:

标签: typo3 fluid typo3-9.x typolink


【解决方案1】:

正确的写法是:

additionalParams="{name: 'value'}"

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

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

【讨论】:

    【解决方案2】:

    它可以在没有附加参数的情况下工作

    <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 建议的方式进行操作

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-05-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-01-04
      • 1970-01-01
      • 2017-01-10
      相关资源
      最近更新 更多