Photos to appear in differnet colums
13 posts by 2 authors in: Forums > CMS Builder
Last Post: September 17, 2008 (RSS)
By kitka - September 14, 2008
If i just copy the present setup as shown below it simply put repeats the items after every row...
Can anyone help with this...Much appreciated?
Here is a smaple mockup...
http://www.rocaroalpacas.ca/saturday.php
So each column and row has a different photo and text....
The preesent text for each <td> <./td> is as follows:
<td><h6> Click for larger view </h6> <br> <?php foreach ($record['mainphoto'] as $upload): ?> <a href="<?php echo $upload['urlPath'] ?>"target="_blank"><img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" border="0" /></a><br><br> <?php endforeach ?> </td>
Re: [kitka] Photos to appear in differnet colums
By Dave - September 15, 2008
Try this:
<table border="1" cellspacing="0" cellpadding="0"><tr>
<?php foreach ($record['mainphoto'] as $upload): ?>
<td>
<a href="<?php echo $upload['urlPath'] ?>"
target="_blank"><img src="<?php echo $upload['thumbUrlPath'] ?>"
width="<?php echo $upload['thumbWidth'] ?>"
height="<?php echo $upload['thumbHeight'] ?>" alt="" border="0" /></a><br><br>
</td>
<?php $maxCols=3; if (@++$count % $maxCols == 0): ?></tr><tr><?php endif; ?>
<?php endforeach ?>
</tr></table>
That will create a table with a cell for each record. Then ever 3 records (cells) it will start a new row.
Hope that helps! Let me know if that works for you.
interactivetools.com
Re: [kitka] Photos to appear in differnet colums
By Dave - September 15, 2008
That error usually means there is no matching field found.
interactivetools.com
Re: [Dave] Photos to appear in differnet colums
By kitka - September 15, 2008
I just took the info from the working version om
http://www.rocaroalpacas.ca/males10.php
Here was the code for that section
<br><?php foreach ($malesRecords as $record): ?>
<table bgcolor="#e4deb1" width="693" cellspacing="0" cellpadding="1" border="0">
<tr>
<td colspan="2" bgcolor="#E6A634"height="15"valign="center"> <h5><?php echo $record['name'] ?></h5> </td>
<td> </td>
</tr>
<tr>
<td width="240" valign="top"> </td>
<td width="240" valign="top"> </td>
<td rowspan="2" align="center" valign="top"> <h6> Click for larger view </h6> <br> <?php foreach ($record['mainphoto'] as $upload): ?> <a href="<?php echo $upload['urlPath'] ?>"target="_blank"><img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" border="0" /></a><br><br> <?php endforeach ?> </td>
</tr>
<tr>
<td colspan="2" width="480" valign="top"><h6><strong>A little info about... <?php echo $record['name'] ?></strong></h6> <br><br>
<h6> <?php echo $record['content'] ?></h6><br/></td><?php endforeach ?>
</tr>
</table>
<br><br>
<div align="center"> ---------------------</div><br><br>
Re: [kitka] Photos to appear in differnet colums
By kitka - September 15, 2008
Here are the working fileds and names
<table> <?php foreach ($malesRecords as $record): ?> <tr>
<td> <h4><?php echo $record['name'] ?></h4><br>
<h6> Click photo for enlarged version </h6> <br> <?php foreach ($record['mainphoto'] as $upload): ?> <a href="<?php echo $upload['urlPath'] ?>"target="_blank"><img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" border="0" /></a> <?php endforeach ?> <br>
<h6> <?php echo $record['content'] ?></h6><br/><hr width="400">
</td>
</tr> <?php endforeach ?> </table>
Re: [kitka] Photos to appear in differnet colums
By Dave - September 16, 2008
Can you attach the file males11.php to the post?
Thanks!
interactivetools.com
Re: [Dave] Photos to appear in differnet colums
By kitka - September 16, 2008
Re: [kitka] Photos to appear in differnet colums
By Dave - September 16, 2008
interactivetools.com
Re: [kitka] Photos to appear in differnet colums
By kitka - September 16, 2008