0

问题

我在一个文件中定制了一些东西,覆盖了这个news扩展文件Templates/Styles/Twb/Templates/News/List.html。这是工作...

<v:variable.set name="special.category" value="1" />

<f:if condition="{special.category}">
  <f:then>
    Do something for the special category when the variable's boolean value is 1
  </f:then>
  <f:else>
    Otherwise do something else
  </f:else>
</f:if>

但是当我尝试将其更改为此时,它不再起作用...

<f:variable name="special.category" value="1" />

<f:if condition="{special.category}">
  <f:then>
    Do something for the special category when the variable's boolean value is 1
  </f:then>
  <f:else>
    Otherwise do something else
  </f:else>
</f:if>

一些文档

我的平台

  • 我正在使用 TYPO3 9.5.3,但也想知道 8.7 的答案。
4

1 回答 1

1

我认为它是变量名中的点。在这种情况下,可能 vhs:variable 的实现方式不同。也许<f:variable name="special" value="{category: 1}"/>这行得通?

于 2018-12-16T13:53:45.880 回答