Whilst waiting for a reply about Wix Studio removing the Lightbox CMS functionality we have previously been used to on Editor X I have been trying to come up with an alternative way to achieve similar results for my needs on the new platform and the idea I’ve come up with would probably end up being more elegant and preferable to the Lightbox Method anyway if I can get it working.
Lightbox Method:
Currently in Editor X I use a repeater to display Video thumbnails and when you click the thumb it will open a lightbox with the specific video and additional info and so on. This works perfectly, but if it’s not going to be an option for us in Wix Studio I need to recreate the same idea (click a repeater thumbnail image and display the full content of that specific clicked item outside of the repeater).
New Idea:
So here is the premise, you have 2 sections of the page:
- The “Main Content Section” with the video repeater as it was before. This is connected to the video database via dataset 1
- A collapsed “Lightbox Substitute Section”. It’s just a section with all the same info that used to be shown in the lightbox. This is connected to the same video database via dataset 2 which is set to show just 1 item and we can filter it so that one of the fields is the same as dataset 1 so they’re both showing identical content (besides the number of items).
Then I added code so that when the video thumbnail is clicked the Main Section collapses and the Lightbox Substitute Section expands and created the reverse “CLOSE” button that will hide that section and once again reveal the Main Section. That’s all working perfectly! I just need some code to change dataset 2 from always displaying the first item from the repeater and instead make it show the clicked item from the repeater.
I’m sure it’ll just be a tiny piece of code to sync up the 2 datasets that I can’t figure out myself?
I’m almost certain it won’t be far off the old code used for the lightbox example, it’s just out of my level of knowledge for sure! Maybe this is a silly way of achieving what I need and there is a simpler way I’m overlooking entirely?
(Just in case it comes up: The whole point of this concept is to NOT use a dynamic item page to display each video instead staying on the same page. The reason for this? On my actual projects I have dropdown filters and search functionality that I didn’t bother adding to my example test pages here and thus if a visitor narrowed the videos down and opens one of the results as an item page and then returns to the search page afterward those previous parameters will be lost and that is an absolute no-no for user experience!
Also opening the video as a dynamic item page in a new window so they can go back to the unaffected results window when they want to is not going to be viable either. No one wants multiple iterations of a site open in their browser tabs, it’s tacky and smacks of bad design and lack of care for the visitors user experience!)