# Linking a Lightbox to a CMS

**URL:** <https://forum.wixstudio.com/t/linking-a-lightbox-to-a-cms/60165>\
**Category:** Ask the community\
**Tags:** cms, question\
**Created:** [June 20, 2024, 10:08pm UTC](https://forum.wixstudio.com/t/linking-a-lightbox-to-a-cms/60165 "2024-06-20T22:08:17Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Saben\_Capobianco](https://avatars.discourse-cdn.com/v4/letter/s/f6c823/32.png) [@Saben\_Capobianco](https://forum.wixstudio.com/u/Saben_Capobianco)\
**Post date:** [June 20, 2024, 10:08pm UTC](https://forum.wixstudio.com/t/linking-a-lightbox-to-a-cms/60165/1 "2024-06-20T22:08:17Z")

</div>

**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

---

<div class="post-metadata">

**Author:** ![Brendon\_Jaramillo](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/brendon_jaramillo/32/88164_2.png) [@Brendon\_Jaramillo](https://forum.wixstudio.com/u/Brendon_Jaramillo)\
**Post date:** [July 29, 2024, 10:35am UTC](https://forum.wixstudio.com/t/linking-a-lightbox-to-a-cms/60165/2 "2024-07-29T10:35:56Z")

</div>

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. ☹

---

<div class="post-metadata">

**Author:** ![DeanAyalon](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/deanayalon/32/94633_2.png) [@DeanAyalon](https://forum.wixstudio.com/u/DeanAyalon)\
**Post date:** [July 29, 2024, 12:17pm UTC](https://forum.wixstudio.com/t/linking-a-lightbox-to-a-cms/60165/3 "2024-07-29T12:17:06Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![DeanAyalon](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/deanayalon/32/94633_2.png) [@DeanAyalon](https://forum.wixstudio.com/u/DeanAyalon)\
**Post date:** [July 29, 2024, 12:17pm UTC](https://forum.wixstudio.com/t/linking-a-lightbox-to-a-cms/60165/4 "2024-07-29T12:17:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Brendon\_Jaramillo](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/brendon_jaramillo/32/88164_2.png) [@Brendon\_Jaramillo](https://forum.wixstudio.com/u/Brendon_Jaramillo)\
**Post date:** [July 29, 2024, 1:45pm UTC](https://forum.wixstudio.com/t/linking-a-lightbox-to-a-cms/60165/5 "2024-07-29T13:45:54Z")

</div>

![Screenshot 2024-07-29 at 6.44.06 AM](https://us1.discourse-cdn.com/wix/original/3X/6/6/66e3a5e8530898f7e852a2cc0f3d8fb664de5c51.png)

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

---

<div class="post-metadata">

**Author:** ![Brendon\_Jaramillo](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/brendon_jaramillo/32/88164_2.png) [@Brendon\_Jaramillo](https://forum.wixstudio.com/u/Brendon_Jaramillo)\
**Post date:** [July 29, 2024, 1:46pm UTC](https://forum.wixstudio.com/t/linking-a-lightbox-to-a-cms/60165/6 "2024-07-29T13:46:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![365JPG](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/365jpg/32/94346_2.png) [@365JPG](https://forum.wixstudio.com/u/365JPG)\
**Post date:** [July 30, 2024, 6:44am UTC](https://forum.wixstudio.com/t/linking-a-lightbox-to-a-cms/60165/7 "2024-07-30T06:44:45Z")

</div>

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:**

```javascript
import wixWindow from 'wix-window';

$w.onReady(() => {

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

            wixWindow.openLightbox("Name of the LightBox")

        })

    });

```

---

<div class="post-metadata">

**Author:** ![Brendon\_Jaramillo](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/brendon_jaramillo/32/88164_2.png) [@Brendon\_Jaramillo](https://forum.wixstudio.com/u/Brendon_Jaramillo)\
**Post date:** [July 30, 2024, 7:12am UTC](https://forum.wixstudio.com/t/linking-a-lightbox-to-a-cms/60165/8 "2024-07-30T07:12:42Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Rob](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/rob/32/84134_2.png) [@Rob](https://forum.wixstudio.com/u/Rob)\
**Post date:** [July 14, 2025, 7:35pm UTC](https://forum.wixstudio.com/t/linking-a-lightbox-to-a-cms/60165/9 "2025-07-14T19:35:10Z")

</div>

For anyone looking on sending information from to the page to the lightbox, you can follow this tutorial:

> **[Hello Lightboxes | Wix Coding Examples](https://dev.wix.com/docs/coding-examples/getting-started/hello-world/hello-lightboxes)**
>
> Send data between the main page and a lightbox. Home
