Reputation: 3523
I am tryind to add a class in fluid based on a condition after addind itenIteration to the each loop.
Here it is only the first that works. Number two comes out as text. So there must be something wrong in the formatting.
<tr class="item{f:if(condition: itemIteration.isFirst, then: 'hidden')}">
<tr class="item{f:if(condition: itemIteration.index > 10, then: 'hidden')}">
I can write it this way so index is working fine!
<tr class="<f:if condition="{itemIteration.index} > 10">hidden</f:if>">
Upvotes: 0
Views: 318
Reputation: 2761
You forgot to quote the condition
<tr class="item{f:if(condition: itemIteration.index > 10, then: 'hidden')}">
must be
<tr class="item{f:if(condition: '{itemIteration.index} > 10', then: 'hidden')}">
Upvotes: 4