Main
Index
Search
Posts
Who's
Online
Log
In

Home: Discontinued/Classic Products: Instant Website: Realty/Listings/Auto:
lining up thumbs with their lot descriptions on listings page

 

 


asenica
New User

Dec 9, 2009, 1:48 PM

Post #1 of 2 (2631 views)
Shortcut
lining up thumbs with their lot descriptions on listings page Can't Post

I am a struggling nubee, trying to input the Realty code into the existing web pages.
I have the search page working and the listings page is working but "how do I get each thumbs to line up with their descriptions, down the page.
I am not really up in tabless formatting, using tables now, but not working.

This is my search page. Click search listing to see what I am talking about on the listings page.
http://www.woodhavenassociation.com/simple/search.php

This is the code on my listings.php page:

<table width="540" height="200" border="0" cellspacing="10" cellpadding="10">
<tr>
<td width="112" height="200" align="left" valign="top">
<?php foreach ($listingsRecords as $record): ?>
<?php foreach ($record['uploads'] as $upload): ?>
<?php if ($upload['hasThumbnail']): ?>
<img src="<?php echo $upload['thumbUrlPath'] ?>" alt="" width=90"<?php echo $upload['thumbWidth'] ?>" height=80"<?php echo $upload['thumbHeight'] ?>" />
<?php break; ?>
<?php elseif ($upload['isImage']): ?>
<img src="<?php echo $upload['urlPath'] ?>" width=90"<?php echo $upload['width'] ?>" height=80"<?php echo $upload['height'] ?>" alt="" /></font> </p>
<p><font size="3" face="Arial, Helvetica, sans-serif">
<?php else: ?>
<a href="<?php echo $upload['urlPath'] ?>">Download <?php echo $upload['filename'] ?></a></font><br/>
</font>
<?php endif ?>
<?php break; ?>
<?php endforeach ?><br /><br />
<?php endforeach; ?>
</td>
<td width="484" height="200" align="left" valign="top"><div align="left">
<?php foreach ($listingsRecords as $record): ?>
<b><font color="#006633" size="3" face="Arial, Helvetica, sans-serif">Section: <?php echo $record['section'] ?>&nbsp; Lot: <?php echo $record['lot'] ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Price: <?php echo $record['price'] ?><br/>
</font><font size="3" face="Arial, Helvetica, sans-serif"></font></b><font size="3" face="Arial, Helvetica, sans-serif">Lot Description: <?php echo $record['lot_description'] ?><br/>
<a href="<?php echo $record['_link'] ?>">View Details</a></font>
<hr align="left"/>
<br/>
</div>
<div align="left">
<?php endforeach; ?>
<?php if (!$listingsRecords): ?>
No records were found!<br/>
<br/>
</div>
<p>
<?php endif ?>
</p></td>
</tr>
</table>


Donna
Staff / Moderator


Dec 10, 2009, 3:01 PM

Post #2 of 2 (2597 views)
Shortcut
Re: [asenica] lining up thumbs with their lot descriptions on listings page [In reply to] Can't Post

Hi Asenica!

It looks like you have all of your images in one table cell, and all of your listings in another. To keep them on the same "line", you'd probably want to have each image & it's matching description to be in one row.

Try moving your <tr> & <td> tags so they're inside the repeating code blocks, so each time CMS builder is repeating your layout text, it's including the <tr> & <td>'s as well. You'll wind up with something like this:


Code
<table> 
begin php repeating code
<tr>
<td>
image code
</td>
<td>
description code
</td>
</tr>
end php repeating code
</table>


Currently, you've got the beginning & ending php repeating code inside the <td> & <tr> tags, so they're not repeated, and no new rows get generated -- all of your images are in one column, and all of your descriptions in another.

I hope this helps! :)

Donna

--
support@interactivetools.com