Multi columns - code validation

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

Re: [zick] Multi columns - code validation

By gkornbluth - June 22, 2011

Hi Zick,

If you got this code from the Cookbook I think that I may have led you astray...

Here's some code that I know works cause I copied it from a working web site of mine.

I've also updated the Cookbook recipe.

Hope it works better for you. Let me know what you find.

Jerry

<table border="0" id="gallery" cellspacing="0" cellpadding="10" align="center">
<tr valign="middle">
<?php foreach ($reflectionsRecords as $record): ?><?php foreach ($record['image'] as $upload): ?>
<td align="center" valign="middle" <?php echo $common_informationRecord['thumbnail_border'] ?> width="15%">
<div align="center">

<a href="<?php echo $upload['thumbUrlPath3'] ?>" rel="milkbox[reflections]" title="
<?php if (!$record['print_price'] && !$record['full_description']): ?><?php if ($record['title']): ?><a href=&quot;#&quot;><h2><?php echo $record['title'] ?><br /><?php echo $record['sub_title'] ?></h2></a><br><?php endif ?>

<?php if (!$record['title']): ?><a href=&quot;<?php echo $record['_link'] ?>&quot;><h2>Click for a larger image.</h2></a><?php endif ?><?php endif ?>

<img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight']?>" /></a>

</div></td>
<?php $maxCols=7; if (@++$count % $maxCols == 0): ?></tr><tr><?php endif; ?>
<?php endforeach ?>
<?php endforeach ?>
</tr>
</table>
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