I have a set of images I want to tile using the column layout in F7. During the loop in the template I want to have the items fill in each row, then start a new row and then at the end finish with a final div if needed. I am not getting the js_if to work well with the @index value.
Here is my attempt for creating the rows. I have not added logic for deciding whether a final div is needed but welcome the help on that.
<div class="page-content">
<div class="row">
{{#each stories}}
{{js_if "@index % 3 === 2"}}
<div class="col-33">last item</div>
</div>
<div class="row">
{{else}}
<div class="col-33">item</div>
{{/js_if}}
{{/each}}
</div>
What I am getting is multiple rows that say ‘last item’ which means my js_if logic is always returning true