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