Hi guys,
I have some pictures for a hotel. in a repeating group displayed in a small size, How can I create click to popup or lightbox for the pictures to display in full ize and maybe flick through them in the lightbox without exiting to see each?
Hi guys,
I have some pictures for a hotel. in a repeating group displayed in a small size, How can I create click to popup or lightbox for the pictures to display in full ize and maybe flick through them in the lightbox without exiting to see each?
Hey
Just set up a popup with an image element inside, then when a user clicks a picture in the repeating group, show the popup and pass the clicked image to it.
To flick through them like a lightbox, you could:
Send the whole list of images to the popup
Use a custom state (like currentIndex) to switch between them with “Next” and “Previous” buttons
It takes a little setup, but works really nicely! Let me know if you want a simple example happy to help
I would appreciate a simple example please. My main problem is with the states.
Also, I guess it’s better to avoid plugins right?
Here’s the general idea without the need of a plugin:
current_index (type: number).current_index by -1 or +1 respectively.Image List: item# current_indexhey @hanskiprop15 thanks a lot. I’ve done everything but the popup is empty. here are some screen shots:
This topic was automatically closed after 70 days. New replies are no longer allowed.