I’m trying to link repeater containers to lightboxes, but I can’t connect that to the database since lightboxes aren’t supported (something that would be wonderful to add in the future). I’ve tried using code with the onclick function for my button in each repeater box, but I can’t seem to get it to work. I’ve tried connecting a string to a text name in the database, but that won’t work either. Here’s what I have on the box button:
export function button1_click() {
let String1 = (“button1”).text;
wixWindow.openLightbox(String1);
}
button 1’s text is linked to the database and has the same name as my lightboxes. I want each container in the repeater to link to its own lightbox using this method, but this isn’t working as the lightbox seems to need an exact name (ie ‘banana’) or it won’t work. Does anyone have a suggestion? I have a column in my database that has the same name as the lightboxes called “title”, so maybe I could use that as well in the lighbox name. Keep in mind I’m not that code savvy (have done an html/css site before but don’t understand java well. Thanks so much!