Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted October 16, 20168 yr What I want to do is display 3 columns per row. The Page code is: {{foreach $rows as $row}} {{$idField = $row::$databaseColumnId;}} ...content... {{endforeach}} I've tried to do a template logic like below but failed: {{if $row % 3 == 2}} line break {{endif}} {{if $row == 3}} line break {{endif}} How do I do it?
October 16, 20168 yr Author Didn't work either... {{if $row % 3 == 0}} line break {{endif}} or {{if count($rows)}} {{foreach $rows as $id}} {{if $id % 3 == 0}} line break {{endif}} {{endforeach}} {{endif}}
October 23, 20168 yr Author I've been trying different things but not getting the results. Any ideas?
October 23, 20168 yr You'd need to use the ipsGrid class, I think. Something like: <div class="ipsGrid"> {{foreach $rows as $row}} {{$idField = $row::$databaseColumnId;}} <div class="ipsGrid_span4"> ... stuff </div> {{endforeach}} </div>
October 24, 20168 yr Author 18 hours ago, Meddysong said: You'd need to use the ipsGrid class, I think. Something like: <div class="ipsGrid"> {{foreach $rows as $row}} {{$idField = $row::$databaseColumnId;}} <div class="ipsGrid_span4"> ... stuff </div> {{endforeach}} </div> As specified in the layout.css, I didn't think about using that. Thanks! With this I can customize or even redo the classes to customize the width, margin, and padding. Thank you!
Archived
This topic is now archived and is closed to further replies.