Linking a Lightbox to a CMS

Question:
I have a gallery set up as a CMS. The gallery shows Image Group A.
When you click on an image in the gallery, I’d like it to open a corresponding item from Image Group B in the same page, ideally as a lightbox.

I have Image Group A and Image Group B both set up as CMS, and a Lightbox gallery linked to Image Group B, but Im not sure how to link them.

I’m using the Wix Website Editor, on Desktop

1 Like

I’m having this same problem. I just want to launch a Lightbox or even an Anchor Point from CMS. I set up a Dropdown to easily launch a PDF Download when the button below it is selected. But, not easy to figure out a way to launch a Lighbox. :frowning:

It’s rather simple, I’ll set up a demo in a few minutes, all it requires is a reference field and a few lines of code :slight_smile:

This is a tad too ambiguous, could you describe it a little more?

It’s easy to link a PDF download using the CMS, but it is difficult to link a Lightbox launch, or Anchor Point link.

This is me showing how I would like to display the Lightbox selection.

If the need to open a pop-up after clicking on the “download” button is to show a “thank you message” or any other static information, you need to add the following code:

Page code:

import wixWindow from 'wix-window';

$w.onReady(() => {

        $w("#YourButtonName").onClick(() => {

            wixWindow.openLightbox("Name of the LightBox")

        })

    });

Interesting. So I can basically do it as a “Form Submission” But I add that code to the Page, or to the Thank You Message, (And then, behavior wise… The User has 10 different options, and I want each option to be a separate Lightbox that launches.)

Thank you by the way!