Image Upload records duplicating

2 posts by 2 authors in: Forums > CMS Builder
Last Post: November 28, 2013   (RSS)

By s2smedia - November 27, 2013

I never seen this before.. I have a page with group of 4 photo. The photos open in a lightbox. For some reason when you click on any of the images and the lightbox pops up, it duplicates the first image of the set 3 times.

http://bit.ly/IsG2Jj

i checked my code multiple times and have no clue why this is happening:

<?php foreach ($portfolioRecord['photos'] as $index => $upload): ?>
<a href="<?php echo $upload['urlPath'] ?>" data-lightbox="<?php echo htmlencode($portfolioRecord['title']) ?>">
<div class="tabblock">

<div class="tabimage2"  style="background-image:url(<?php echo $upload['urlPath'] ?>)"></div>



</div>
</a>
<?php endforeach ?>

By Daryl - November 28, 2013

Hi s2smedia,

I can't say for sure what's causing the problem. But it looks like the first image is being generated three times.

First is inside a <p> tag, second is in the <div class="tabblock">, and another one after that div block. See the attached file.

Would you mind if I take a closer look by posting the whole code or attaching the file here?

Thank you,

Daryl Maximo
PHP Programmer - interactivetools.com
Attachments:

lightbox.png 20K