GrooveOnBeat Posted October 16, 2016 Share Posted October 16, 2016 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? Link to comment Share on other sites More sharing options...
GrooveOnBeat Posted October 16, 2016 Author Share Posted October 16, 2016 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}} Link to comment Share on other sites More sharing options...
GrooveOnBeat Posted October 23, 2016 Author Share Posted October 23, 2016 I've been trying different things but not getting the results. Any ideas? Link to comment Share on other sites More sharing options...
Meddysong Posted October 23, 2016 Share Posted October 23, 2016 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> Link to comment Share on other sites More sharing options...
GrooveOnBeat Posted October 24, 2016 Author Share Posted October 24, 2016 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! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.