Wrong image displaying/same image on every page
5 posts by 3 authors in: Forums > CMS Builder
Last Post: April 8, 2009 (RSS)
By Kittybiccy - April 7, 2009
I added the generated code into the cell where the image is to be displayed:
<?php foreach ($church_endRecord['top_banner'] 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 ?>
But when you navigate through the pages, the image from the first record is displayed on every page. I have checked and there are different images in CMSB for each so I'm not being that stupid!
This is the page I'm testing:
http://www.arcschoolsuk.com/CMSB/church_end.php?1 and if you click through to facilities or resources no change in top image!
Any suggestions?
Re: [Kittybiccy] Wrong image displaying/same image on every page
By Kenny - April 7, 2009
'orderBy' => 'RAND()',
That should pull a random image each time.
Kenny
Re: [sagentic] Wrong image displaying/same image on every page
By Kittybiccy - April 7, 2009
I basically need it to pull in the top banner image as it pulls in the copy and the side image.
Re: [Kittybiccy] Wrong image displaying/same image on every page
By ross - April 7, 2009
I think the problem is going to a be a conflict in the viewers that you have at the top of your page. If you have more than one, they can be interfering with eachother depending on what's in the URL.
Could you post a copy of the page you are working with?
Thanks!
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com
Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/
Re: [ross] Wrong image displaying/same image on every page
By Kittybiccy - April 8, 2009
Attached is the page.
Why would they conflict, could you explain in real basic terms so I know what I'm doing wrong!
Hannah