Jump to content

3 Columns then Force Next Row and Repeat


GrooveOnBeat

Recommended Posts

Posted

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?

Posted

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>

 

Posted
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! :lol:

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...