HI,
I have seen many posts around this subject but I just cant get it to work.
I have the standard two dynamic pages (All & List page) on my site and I am trying to code the repeater so as the button “Read more” opens the linked page.
Simple enough not using code but is proving not so easy for me using code.
Here is my page code all is working perfectly retrieving the data for repeater just the button on click part does not work.
function repeater ( ){
$w ( "#checkinsrepeater" ). onItemReady ( ( $item , itemData , index ) => { // Gets tdata set ready
$item ( "#nameText" ). text = itemData . name ;
$item ( "#frontImage" ). src = itemData . frontPhoto ;
$item ( "#backImage" ). src = itemData . backPhoto ;
$item ( "#weightText" ). text = itemData . weightInKg . toLocaleString ( 'en' );
$item ( "#weightDifftext" ). text = itemData . weightDifference ;
$item ( "#tWchangetext" ). text = itemData . totalWeightChange ;
$item ( "#descriptionText" ). text = itemData . howDidYouFeelThisWeek ;
$item ( '#MoreButton' ). onClick (( event , $w ) =>{
wixLocation . to ( "/link-check-ins-2-checkinId" );
console . log ( "Check-In Page = " ) + itemData . link - check - ins - 2 - checkinId ;
})
//console.log('/Check-Ins/' + itemData.link-check-ins-checkinId;
console . log ( "Weight In KG = " ) + itemData . weightInKg ;
$w ( '#titleText' ). text = "All Check-ins" ;
$w ( '#titleDesciptiontext' ). text = "Here you can view all your client check ins (Click on a read more to open full view)" ;
});
I want the page to link to the below location.
the Field key for that column is link - check - ins - 2 - checkinId
How do I get the button to take me to that page in the code?