I’m querying my Employee collection to get all employees. I then populate the items in a repeater and I want to link the image to the dynamic page that contains all information about an employee. However everything is fine, but I cannot access the dynamic page link field in any way.
The code part that doesnt work looks like this, and the commented line in the bottom is the one that’s not working. Anyone who knows whats wrong?
$w('#employeesRepeater').onItemReady(($item, itemData) => {
$item("#text5").text = `${itemData.title} ${itemData.lastName}\n
${itemData.mobile}\n ${itemData.email}`;
$item("#text9").text = itemData.reference.title;
$item('#imageX1').src = itemData.mainImage;
$item('#imageX1').link = `/team/${itemData.title}/${itemData.lastName}`;
//$item('#imageX1').link = itemData.link-employees-title;