Multi-record displaying in Multiple Columns - help please! :)

3 posts by 2 authors in: Forums > CMS Builder
Last Post: April 17, 2013   (RSS)

By csdesign - April 17, 2013

I've done this before and tried using the same code but it wouldn't work for me. I pulled code from the cmscookbook and that's not flying either so I'm assuming it's something obvious that I'm doing wrong.  Here's my code: 

Thanks!!! Tina

<?php foreach ($wildlife_photographyRecords as $record): ?>                 <table width="470" border="0" cellspacing="2" cellpadding="2">                     <tr>                       <td width="295" align="center" valign="middle">                       <?php foreach ($record['images'] as $index => $upload): ?>                      <table width="100" border="0" cellpadding="4" cellspacing="0" id="frame">             <tr>               <td align="center" valign="middle"><a href="<?php echo $record['_link'] ?>"><img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="<?php echo $upload['info1'] ?>" /></a></td>             </tr>           </table>                      <?php break /* only show one image */ ?>         <?php endforeach ?>                      </td>                       <td width="236" align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="3">                         <tr>                           <td bgcolor="#20232B"><h3><a href="<?php echo $record['_link'] ?>"><?php echo htmlencode($record['title']) ?></a></h3></td>                         </tr>                         <tr>                           <td bgcolor="#20232B" class="content"><?php echo htmlencode($record['short_image_description']) ?></td>                         </tr>                         <tr>                           <td bgcolor="#20232B" class="bannerCaption">LOCATION:</span><span class="content"> <?php echo htmlencode($record['location']) ?></td>                         </tr>                         <tr>                           <td bgcolor="#20232B"><?php echo htmlencode($record['paypal_add_to_cart_code']) ?></td>                         </tr>                         <tr>                           <td bgcolor="#20232B"><h5><?php echo htmlencode($record['image_tags']) ?></h5></td>                         </tr>                       </table></td>                     </tr>                     <tr>                       <td align="center" valign="middle">&nbsp;</td>                       <td align="center" valign="middle">&nbsp;</td>                     </tr>                 </table> <?php $maxCols=2; if (@++$count % $maxCols == 0): ?><?php endif; ?> <?php endforeach ?>

By csdesign - April 17, 2013

Oops. Forgot...  The records are displaying in a single column rather than 2 columns. 

http://www.greatbearreflection.com/wildlife-big-game-photography-wy.php