Laying Out Photos x 3 columns

3 posts by 3 authors in: Forums > CMS Builder
Last Post: April 21, 2009   (RSS)

Re: [benedict] Laying Out Photos x 3 columns

By ross - April 21, 2009

Hi benedict

Thanks for posting.

The best place to start on this one is going to be a working template. For the time being, don't worry about any PHP. Just make the HTML work exactly how you want it to. Even use placeholder images so you can see how they will spread out in the table.

Get that going, and we'll go forward from there together. Thanks
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [benedict] Laying Out Photos x 3 columns

You may be running into this issue...

If you’re going to use that little code snippet multiple times on the same page, you'll need to use a different variable instead of $count or it will remember the count from the last section and increment that.

Instead of this:

<?php $maxCols=3; if (@++$count % $maxCols == 0): ?></tr><tr><?php endif; ?>

Use this:

<?php $maxCols=3; if (@++$count1 % $maxCols == 0): ?></tr><tr><?php endif; ?>

<?php $maxCols=3; if (@++$count2 % $maxCols == 0): ?></tr><tr><?php endif; ?>

<?php $maxCols=3; if (@++$count3 % $maxCols == 0): ?></tr><tr><?php endif; ?>

As Dave says...

Hope that helps,

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php