Disable click/link on item in wix pro gallery?

Hi all, I am using Wix pro gallery to display my images from a dynamic dataset. I have 5 images displaying and when you click on it, their dynamic page opens. But on the 6th one, I don’ want the page to open. That is a “coming soon” image. If the user clicks on it, it should not go to a dynamic page or may be disabled. How can I do that? I also can’t remove the dynamic link from the content manager as it is not allowed. Can someone guide on this, please?

Hi Haris,

Way1:
You could add a field in your database. You could write “link” or something in the items you want to link it to a dynamic URL. Then on your dynamic page, you can go to the dataset settings and add a filter: includes any of “link”. Then when someone clicks on the image that you want a coming soon page: they will see a 404 error page. There is probably another way of doing it.

https://support.wix.com/en/article/filtering-database-content-displayed-on-your-page#adding-a-filter-to-your-dataset

Way2:
Add a URL field in your database and add the ending of your URLs you want them to go, then in your code, you could use a repeater to redirect the user to the URL. Something like that.

@russian-dima , any other suggestions??? This is all I can think of.:sweat_smile:

Arthur

Hi, Thank you for your response. Actually, I don’t wan’t to redirect anywhere. I just want the item to be disabled and when it is clicked, it just stays there.

All i can say is,

that if you want to find a solution for your issue, so then you have to take a look here…

https://www.wix.com/corvid/reference/$w/gallery

All what can be done by CODE with the GALLARY, you will find in this link.

If there is an option, you can do something like…

  1. identify the items

  2. do a if-query —> if (selectedItemIndex===6) {do NOTHING} else{ do something}

  3. regarding the onClick-Event…

$w("#myGallery").onItemClicked( (event) => {
2  let itemDescription = event.item.description; // "Description"
3  let itemIndex = event.itemIndex;              // 3
4} );

But this is just a theoretical thought. I do not like to work with gallaries.