Only for each loop is within the uploads section and rest of the page is php echo. This is setup using the basic car template you sell.
<?php
/* STEP 1: LOAD RECORDS - Copy this PHP code block to the TOP of your page BEFORE anything else. */
require_once "init.php";
list($listingRecords, $listingDetails) = getRecords(array(
'tableName' => 'listings',
'joinTable' => 'homepages',
'where' => whereRecordNumberInUrl(1),
'limit' => '1',
));
$listing = @$listingRecords[0];
if (!$listing) { print "listingsRecord not found!"; exit; }
?>
<?php include "include_header.php"; ?>
<div class="subheader">View : <?php echo $listing['vehicle'] ?></div><br/>
<table border="0" cellspacing="0" cellpadding="2" width="590">
<tr>
<td rowspan="20" valign="top" align="center" width="165">
PHOTOS<br/>
<b>Click photo to enlarge</b><br/><br/>
<?php foreach ($listing['uploads'] as $upload): ?>
<?php if ($upload['hasThumbnail']): ?>
<a href="<?php echo $upload['urlPath'] ?>"><img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" border="0" title="<?php echo $upload['info1'] ?>" alt="<?php echo $upload['info2'] ?>" /></a><br/>
<?php echo $upload['info3'] ?><br/>
<?php endif ?>
<?php endforeach ?>
<?php if (!$listing['uploads']): /* if no uploads show this: */ ?>
<table cellspacing="0" cellpadding="0" width="150" class="noPhoto" style="height: 100px">
<tr><td bgcolor="#EEEEEE" align="center"><b>Photo<br/>Not<br/>Available</b></td></tr>
</table>
<?php endif; ?>
</td>
<td valign="top">
<div class="separatorBar" style="padding: 3px 3px 3px 3px;">
<div style="float: right;"><b>Price</b> $<?php echo number_format($listing['price']); ?></div>
<div><strong>Details</strong></div>
</div>
<?php foreach ($listing['uploads'] as $upload): ?>
<?php if ($upload['hasThumbnail']): ?>
<a href="<?php echo $upload['urlPath'] ?>" rel="lightbox['gallery']" title="<?php echo $upload['info2'] ?>"><img src="<?php echo $upload['thumbUrlPath'] ?> " width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" border="1" title="<?php echo $upload['info1'] ?>" alt="<?php echo $upload['info2'] ?>" /></a><br/>
<?php echo $upload['info3'] ?><br/>
<?php endif ?>
<?php endforeach ?>
<?php if (!$listing['uploads']): /* if no uploads show this: */ ?>
<table cellspacing="0" cellpadding="0" width="125" class="noPhoto" style="height: 100px">
<tr><td bgcolor="#EEEEEE" align="center"><b>Photo<br/>Not<br/>Available</b></td></tr>
</table>
<?php endif; ?>
<b><u>Photos Courtesy of</u></b><br/> <?php echo $listing['photos_courtesy_of'] ?>
</td>
<td valign="top">
<div class="separatorBar"><b><u>Profile Details:</b> - <b><?php echo $listing['year'] ?></b> <b><?php echo $listing['vehicle'] ?> <?php echo $listing['model'] ?></b></u></div></div></div>
And so on