View List Page in Columns

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

By webfoot - October 12, 2009 - edited: October 12, 2009

Hello,

I have been reading and trying the various postings on columns for list page views but am getting soooo confused.

As you can see here a graphic of the store list page formatted into 3 columns:

http://www.infinitewell-being.com/mockup/

How do I get this into a table with 3 columns. I have copied and tweaked a post below of what I think it should be.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<table border="1">
<tr>
<?php foreach ($storeRecords as $record): ?>

<td>


<?php foreach ($record['product_picture'] as $upload): ?>
<?php if ($upload['hasThumbnail']): ?>
<img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" /><br/>

<?php elseif ($upload['isImage']): ?>
<img src="<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt="" /><br/>

<?php else: ?>
<a href="<?php echo $upload['urlPath'] ?>">Download <?php echo $upload['filename'] ?></a><br/>

<?php endif ?>
<?php endforeach ?>

<p> <?php echo $record['product_name'] ?></p><br/>
<?php echo $record['add_to_cart'] ?><br/>
<p> <a href="<?php echo $record['_link'] ?>">More information...</a></p>

</td>

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

All help appreciated!
melinda
webfootstudios.com

Re: [webfoot] View List Page in Columns- It Worked!

By Donna - October 14, 2009

Hi Melinda! Glad to hear that worked for you. :D
Donna

--
support@interactivetools.com