Home | Products | Consulting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder:
display pics in rows

 

 


s2smedia
User

Nov 25, 2008, 7:46 AM

Post #1 of 3 (364 views)
Shortcut
display pics in rows Can't Post

I have a photo upload section where i want each photo to show up horizonal instead of vettically...

I need each row to have 3 pics...

after the 3rd pic i need it to repeat a new row

here is my code but it keeps adding the pics to the same row after the 3rd one:

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<?php foreach ($photo_galleryRecords as $record): ?>
<td><?php foreach ($record['image_uploader'] as $upload): ?>
<?php if ($upload['hasThumbnail']): ?>
<a href="<?php echo $upload['urlPath'] ?>" rel="lightbox" title="<?php echo $record['title'] ?>"> <img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" /></a></td> <?php endif ?>
<?php endforeach ?>
<?php endforeach; ?>
</tr>
</table>
<br/>




<?php if (!$photo_galleryRecords): ?>
<span class="bodytext">No Photos Available!</span><br/><br/>
<?php endif ?>


Dave
Staff / Moderator


Nov 25, 2008, 9:41 AM

Post #2 of 3 (360 views)
Shortcut
Re: [s2smedia] display pics in rows [In reply to] Can't Post

Hi s2smedia,

Try this:


Code
<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr>  

<?php foreach ($photo_galleryRecords as $record): ?>
<?php foreach ($record['image_uploader'] as $upload): ?>

<td><a href="<?php echo $upload['urlPath'] ?>" rel="lightbox"
title="<?php echo $record['title'] ?>"><img src="<?php echo $upload['thumbUrlPath'] ?>"
width="<?php echo $upload['thumbWidth'] ?>"
height="<?php echo $upload['thumbHeight'] ?>"
alt="" /></a></td>

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

<?php endforeach ?>
<?php endforeach; ?>

</tr></table><br/>


Let me know if that does what you want.

Dave Edis - Senior Developer
interactivetools.com


s2smedia
User

Nov 25, 2008, 10:06 AM

Post #3 of 3 (357 views)
Shortcut
Re: [Dave] display pics in rows [In reply to] Can't Post

As always...your right on the money!!!

Thanks Dave!!

 
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4