Details on list page displaying wrong

5 posts by 2 authors in: Forums > CMS Builder
Last Post: September 8, 2010   (RSS)

Can anyone suggest where I'm going wrong? Trying to get the details of a section to display below one another on the list page but can't get the repeats to display correctly. I've got the first entry behaving as I want it to (image to the left, text to the right with a line below to separate the entries) but can't figure out where the bits of php need to go to get it repeating correctly!

Here's the page in question: http://www.blackswan.org.uk/cmsb/studio_shops_somerset_List.php

If anyone can help I'd really appreciate it! :)

Re: [Kittybiccy] Details on list page displaying wrong

By zip222 - September 8, 2010

The problem you're having is actually not related to the php - it's CSS-related. Specifically floating and clearing. If you can post just the repeating area of the page, including the php, I can give you a hand.

Re: [zip222] Details on list page displaying wrong

Thanks Zip. Here's the code:
<td class="bodytext"><!-- STEP2: Display Records (Paste this where you want your records to be listed) -->
<div id="studio_content">
<?php foreach ($studio_shopsRecords as $record): ?>

<div id="studio_image"> <?php foreach ($record['studio_portrait'] as $upload): ?>
<?php if ($upload['hasThumbnail']): ?>
<img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" /><br/>

<?php elseif ($upload['isImage']): ?>
<img src="<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt="" /><br/>

<?php else: ?>
<a href="<?php echo $upload['urlPath'] ?>">Download <?php echo $upload['filename'] ?></a><br/>

<?php endif ?>
<?php endforeach ?>
<img src="images/15pxwhitesquare.jpg"></div>

<div id="studio_text"><span class="redheadings"><?php echo $record['title'] ?></span><br/>
<?php echo $record['intro'] ?>
<strong> <a href="<?php echo $record['_link'] ?>" class="bodytext"> Read More...</a></strong><br/>
</div>
</div><br><br>

<?php endforeach ?>

<?php if (!$studio_shopsRecords): ?>
No records were found!<br/>
<?php endif ?>
<!-- /STEP2: Display Records --></td>

Re: [zip222] Details on list page displaying wrong

Worked a treat, thank you :)