THE CODE FOR A 2 COLUMN LISTING PAGE WITH A LINKED IMAGE - Aug 2nd, 2010


Here’s an example of a 2 column list page that lists events in rows with a list page image in one column and a short
description of the event and the date(s) for the event in another. Note that “if” statements are used to eliminate
extra spaces and special text if there is no information in particular fields. The “list_page_image” is a field that
holds a specific image that’s uploaded for display on the list page.



<table width="90%" border="0" cellpadding="5"><?php foreach ($happeningsRecords as $record): ?>
<tr>
<td align="center">&nbsp;</td>
<td align="left" valign="top"><hr align="left" width="300" color="#99945e"/></td>
</tr>
<tr>
<td align="center">

<?php foreach ($record['list_page_image'] as $upload): ?><a href="<?php echo $record['_link'] ?>"><img src="<?php echo
$upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>"
alt="" /></a> <div class="body-text-bold">
<?php if ($upload['info1']): ?><?php echo $upload['info1']; ?><?php endif; ?><br />
<?php if ($upload['info2']): ?><?php echo $upload['info2']; ?> <?php endif; ?></div>
<?php endforeach; ?>

</td><td align="left" valign="top"><a href="<?php echo $record['_link'] ?>"><span class="heading-text-bold"><?php echo
$record['title'] ?></span> <?php if ($record['short_description']): ?><br /><span class="body-text-bold"><?php echo
$record['short_description'] ?></span><?php endif ?><br />
<span class="body-text"><?php echo date("D, M jS, Y g:i", strtotime($record['starting_date'])) ?>
<?php if ($record['ending_date']): ?>
through <?php echo $record['ending_date'] ?></span>
<?php endif; ?>
<br />
</a><?php endforeach; ?> </td>
</tr>
</table>




The materials on this web site have been created for use with CMS Builder content management software. CMS Builder software is published and licensed for use by InteractiveTools.com. Please contact Interactive Tools for information on the downloading of the software or the purchasing of licenses.


Terms of Service