multi-section, 2 column display

3 posts by 2 authors in: Forums > CMS Builder
Last Post: March 14, 2012   (RSS)

By csdesign - March 13, 2012

Hello,
I'm having what I hope is an easy to fix problem. So far, I have not been able to get this to work:

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

I'm sure I'm just using it in the wrong place.

I have a multi-section editor where 4 different items are entered (each with a title, description, image & link to more info) I have a single table that I would like to repeat into 2 columns.

Here's the live page:
http://www.xktcioxp.myutilitydomain.com/lodging-bed-and-breakfast-cody-wy.php

Here's my code:
<table width="275" border="0" cellspacing="0" cellpadding="4">
<tr>
<td><?php foreach ($room_list_pageRecords as $record): ?>
<h2><?php echo $record['title'] ?></h2></td>
</tr>
<tr>
<td><?php foreach ($record['room_photo'] as $upload): ?>
<?php if ($upload['hasThumbnail']): ?>
<table width="100" height="100" border="0" cellpadding="0" cellspacing="0" id="frame">
<tr>
<td>
<a href="<?php echo $upload['urlPath'] ?>" rel="lightbox[uploads]" title="<?php echo $upload['info2'] ?> www.lambrightplace.com"><img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" border="1" alt="<?php echo $record['tags'] ?>" /></a> </td>
</tr>
</table>

<?php endif ?>
<?php endforeach ?> </td>
</tr>
<tr>
<td><?php echo $record['content'] ?> </td>
</tr>

<tr>
<td class="textmain_sub_title"><a href="<?php echo $record['room_page_url'] ?>">MORE INFORMATION...</a></td>
</tr>
<tr>
<td><?php endforeach ?>
<?php if (!$room_list_pageRecords): ?>
No records were found!<br/>
<br/>
<?php endif ?></td>
</tr>
<tr>
<td bgcolor="#00FF66"></td>
</tr>
</table>


Thanks!! Tina

Re: [csdesign] multi-section, 2 column display

By gkornbluth - March 14, 2012

Hi Tina,

The answer from the CMSB Cookbook [url]http://www.thecmsbcookbook.com[/url ]that I offered in this post might get you going in the right direction.

Best,

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