To many Images Showing up

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

By KCMedia - June 3, 2011

Hi

i have this page that has a gallery on it i have the limit set to 10 and it shows up more than 10 images why is this happening

www.hotlocks.net.au

file is also attached
Thanks



Craig

KC Media Solutions

www.kcmedia.biz
Attachments:

index_037.php 17K

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: [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