【问题标题】:How to output curly brackets in a TYPO3 Fluid template如何在 TYPO3 Fluid 模板中输出大括号
【发布时间】:2013-09-19 22:10:27
【问题描述】:

通过在 TYPO3 Fluid 模板中使用它

<f:uri.action arguments="{start: '\{start\}'}" [...] />

我希望得到以下输出

index.php?id=1&tx_plugin_pi1[start]={start}...         // unescaped
index.php?id=1&tx_plugin_pi1%5Bstart%5D=%7Bstart%7D... // escaped

但我明白了

index.php?id=1&tx_plugin_pi1[start]=\{start\}...             // unescaped
index.php?id=1&tx_plugin_pi1%5Bstart%5D=%5C%7Bstart%5C%7D... // escaped

我怎样才能得到预期的结果?

更新: Forge 上有一个功能请求:http://forge.typo3.org/issues/46257。但我仍然不知道如何将其固定在参数之类的数组上。

【问题讨论】:

    标签: typo3 fluid


    【解决方案1】:

    我找到了一个受http://forge.typo3.org/issues/46257#note-7 启发但不使用控制器的解决方案

    <f:alias map="{ocb: '{', ccb: '}'}">
        <f:uri.action arguments="{start: '{ocb}start{ccb}'}" [...] />
    </f:alias>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-12-07
      • 1970-01-01
      • 1970-01-01
      • 2010-12-12
      • 2021-04-27
      • 1970-01-01
      • 2011-03-20
      • 2023-03-10
      相关资源
      最近更新 更多