I am using a lightbox as a menu for my site, and I have created the menu inside. I am not using the Wix menu due to some layout needs that I wanted. I am using buttons, but for whatever page that I am on, I want to disable that button so that it is Grayed out. I am looking for advice on how to use Wix.location in order to tell what page my site is on so that inside the lightbox I can target the appropriate button to be disabled.
Just use Wix Location on your page to get the page url for example and then send it to the lightbox so that the lightbox knows what button to disable.
How do I pass data between a page and a lightbox?
When you open a lightbox using the openLightbox() function, you can pass an object containing data to be used in the lightbox. In the lightbox’s code, you call the getContext() function to retrieve the data sent by the openLightbox() function.
When you close the lightbox using the close() function, you can pass an object containing data to be used by the page that opened the lightbox. This data is retrieved from the resolution of the Promise returned by the openLightbox() function.
An example if you can;t work out the Wix API code examples from the links above.
https://www.vorbly.com/Vorbly-Code/WIX-CODE-SENDING-DATA-TO-LIGHTBOX