To many Images Showing up

5 posts by 3 authors in: Forums > CMS Builder
Last Post: June 6, 2011   (RSS)

Re: [kcmedia] To many Images Showing up

By rconring - June 3, 2011

I think it is because you are looping through 5 galleries (limit set to 5 in viewer) and displaying the entire array of photos in each gallery. So if you had 5 galleries and 5 photos per gallery, 25 would display. The inner foreach loop displays all the photos in 1 gallery, then breaks to the outer loop for the next gallery.
Ron Conring
Conring Automation Services
----------------------------------------
Software for Business and Industry Since 1987

Re: [kcmedia] To many Images Showing up

By robin - June 3, 2011

Hey Craig,

This thread has an example for limiting the number of images that a record displays.

http://www.interactivetools.com/forum/gforum.cgi?post=87848#87848

Hope that helps,
Robin
Robin
Programmer
interactivetools.com

Re: [robin] To many Images Showing up

By KCMedia - June 3, 2011

Hi Robin

i have made changes but still not working what is wrong the file is attached.
Thanks



Craig

KC Media Solutions

www.kcmedia.biz
Attachments:

index_038.php 18K

Re: [kcmedia] To many Images Showing up

By robin - June 6, 2011 - edited: June 6, 2011

Hey,

I don't see any sign of the example code in the file you sent?

Here is a possible example to integrate with your $about_us images.

<?php $counter=0; ?>
<?php foreach ($about_usRecord['image'] as $upload): ?>
<?php $counter++; ?>
<?php if($counter > 20): ?>
<?php break; ?>
<?php endif; ?>


Hope that helps,
Robin
Robin
Programmer
interactivetools.com