Looking for code that will change the URL of a button within a repeater. I have two fields in my collection one is default URL and another for alternate URL. I want to tell the button to use the alternate URL if data exists in that field, otherwise use the default URL. Can someone help with a little code for this? Thanks so much!
Product:
Editor X
This is the page, and it’s the “View More” button within the repeater section.
This should be called after you perform a wixData query to retrieve your data. Pass the items from the query response to this function and it should set your repeater. Note you will also need to attach the data for all other elements (ex. $item(“myImage”).src = itemData.imageToShow) of the repeater should you opt for this solution.