viewer display all, putting sets of 4 records in a div

2 posts by 2 authors in: Forums > CMS Builder
Last Post: March 8, 2011   (RSS)

Re: [rez] viewer display all, putting sets of 4 records in a div

By Jason - March 8, 2011

Hi Tony,

So what you're looking for is to display 4 records at a time inside a div class items. Is that right?

You could try something like this example:

<?php

$maxRecords = 4;
$recordCount = 1;

?>

<div class ="items" >

<?php foreach ($recordList as $record): ?>

<?php if($recordCount % $maxRecords == 0): ?>

</div>
<div class = "items" >

<?php endif ?>


<div class="page">
...
</div>

<?php $recordCount ++; ?>
<?php endforeach ?>

</div>


Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/