Creating a link

I’ve got a box in the homepage that importing a random “position” from the DB. How can I create a link from the correct position that shows at the box to the lightbox?

this is the site -

I tried to use the
wixWindow.openLightbox(“View”);
thing but it’s didn’t imorted the correct position to the lightbox.
Thanks.

Its looks like this -
//----
export function dataset7_ready(event) {
//Add your code for this event here:
let counter = 0
const numberJobs = 4
const totalHotJobs = $w(‘#dataset7’).getTotalCount()
setInterval(() => {
$w(‘#dataset7’).getItems(counter % numberJobs, numberJobs).then(items => {
$w(‘#text81’).text = items.items[0].title
counter = counter + 1
if (counter >= totalHotJobs) {
counter = 0
}
})
}, 4000)
}
//-----

Hi Hadar,
Firstly, I noticed that on a different function you use different datasets which may cause issues:

As for your query, I’m not sure that I fully understand the scenario. Can you please send us a video of it?
Simply recreate the issue while recording the steps. Add the screencast.com URL to your response.

Awaiting your reply,
Tal.

So i want that these boxes will lead to the correct position Lightbox. I tried to use this script, but it didn’t work for me -

export function text81_click(event) {
wixWindow.openLightbox(“View”, {
currentIndex: event.rowIndex,
items: $w(‘#dataset7’).getItems
});


Thanks!