Lightbox gallery question

3 posts by 2 authors in: Forums > CMS Builder
Last Post: October 24, 2018   (RSS)

By daniel - October 16, 2018

Hi Koen,

Yes, you can do this relatively simply by only displaying the "More Images" text when the $index variable is equal to 0. It would look something like this:

<?php foreach ($eb_fotosRecord['fotos'] as $index => $upload): ?> 

<a class="read-more" href="<?php echo $upload['urlPath'] ?>" data-lightbox="example-set" data-title="Test1"><?php echo ($index == 0 ? 'More images' : ''); ?></a>

<?php endforeach ?>

Let me know if you have any further questions!

Thanks,

Daniel
Technical Lead
interactivetools.com

By kovali - October 24, 2018

Thx Daniel, it works perfect like this !!