Image on listing page

4 posts by 2 authors in: Forums > CMS Builder
Last Post: January 28, 2009   (RSS)

By vyskocil - January 27, 2009

On this listings page all the images are showing. I read through the posts and tried several of the suggestions. Then I end up getting only one image, but the one image is for the entire listings page. So the first listing will now have one image and the listings following have no images.

How can I get the listings page to show only one image for each of the listings?

Thanks

Re: [vyskocil] Image on listing page

By Dave - January 27, 2009

Hi vyskocil,

You'll have two foreach loops on your list page. The first one loops over your listing records and displays them. Then inside of that there will be one that loops over the images for each listing and display those.

Inside the second foreach add this right before the "endforeach":

<?php break; ?>

And that will make it "break" out of the image foreach loop after showing just one image.

If you still have any troubles with it attach the viewer file and we can take a look.

Hope that helps.
Dave Edis - Senior Developer
interactivetools.com

Re: [vyskocil] Image on listing page

By Dave - January 28, 2009

Hi vyskocil,

No problem, copy and paste "Step 2a" just above this code:

<?php endforeach; ?>
<?php if (!$realty_listingRecords): ?>

Then it should work properly. Alternatively you can try creating a new list viewer code with the code generator. The code must have gotten shuffled around some how.

If that doesn't work for you let me know and we can take a closer look.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com