【问题标题】:TYPO3 fluid itemIteration.index > 10TYPO3 流体 itemIteration.index > 10
【发布时间】:2014-05-20 13:50:05
【问题描述】:

我正在尝试在将 itenIteration 添加到每个循环之后根据条件在流体中添加一个类。

这里只有第一个有效。第二个以文本形式出现。所以格式肯定有问题。

<tr class="item{f:if(condition: itemIteration.isFirst, then: 'hidden')}">
<tr class="item{f:if(condition: itemIteration.index > 10, then: 'hidden')}">

我可以这样写,所以索引工作正常!

<tr class="<f:if condition="{itemIteration.index} > 10">hidden</f:if>">

【问题讨论】:

    标签: typo3 fluid


    【解决方案1】:

    你忘了引用条件

    <tr class="item{f:if(condition: itemIteration.index > 10, then: 'hidden')}">
    

    必须

    <tr class="item{f:if(condition: '{itemIteration.index} > 10', then: 'hidden')}">
    

    【讨论】:

      猜你喜欢
      • 2017-07-14
      • 2015-04-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-07-12
      • 2021-09-01
      • 2023-03-09
      相关资源
      最近更新 更多