Linking Button in Repeaters

Hi, All

I need little help, I am working on Spices Website and I make a Dynamic Page in this site with Data collection. I am a little stuck up on this site.

I need to know how can I activate/link Button in repeaters and connect with another page.

I mean: If I choose “Black pepper powder” in my product range and click on the CTA button(“Read more”), So my page jumps to the “Black pepper powder” page where I mention some more information of Black Pepper Powder with the image.

I hope you understand, my problem. Please guide me on how can I resolve this issue.
Thank you and Have a nice day!

Regards

S. Kainth

Store the relevant link in you database collection (let’s say the field key is “productLink”), then on the page:

$w.onReady(() => {
$w("#repeater1").onItemReady(($i, iData) => {
$i("#button1").link = iData.productLink;
})
})

Thanks, J.D. for your Big Help.

On Preview Mode, It’s Working but it’s Not working on live site.
I see the error. Please see the screenshot.

And

I write code like this on (Page Code)

// For full API documentation, including code examples, visit Velo API Reference - Wix.com

$w.onReady(function () {
//TODO: write your page related code here…

});

$w.onReady(() => {
$w(" #repeater1 “).onItemReady(($i, iData) => {
$i(” #button22 ).link = iData.productLink;
})
}

My dynamic dataset id name is: All Range
Button ID is: 22

Sorry, I’m not knowing about Wix Code and How is written correctly.

And, Red dot comes in front of following line(code)
$i( " #button22 ).link = iData.productLink;

See in blue:
$i( " #button22 " ).link = iData.productLink;

Thanks It’s Working :D. You are Awesome J.D.

You’re welcome :slight_smile: