Repeater Button OnClick Function To Redirect to User Profile Associated with the Post ?

Hi All,

I’m having trouble with a social feed page and hope its a simple fix!

I need a button within a repeater to link to the profile of the person who posted the item.

So essentially it is a status feed with a view profile button that I want to link to the dynamic profile page of the user that posted the particular status.

I tried the below but it doesn’t work.

import wixUsers from ‘wix-users’;
import wixData from ‘wix-data’;
import wixLocation from ‘wix-location’;
$w(“#button7”).onClick((event, $w) => {
let targetId = $w(“#dataset1”) .getCurrentItem() [“link-/profile/{nickname}/profile”];
wixLocation.to(targetId);
});

I’ve tried so many ways to get this to work and every way seems to not allow it!

Any tips or advice very much appreciated!

<3

Elaborate more on what profile you are trying to connect to, is it site members profile only, is it your own page setup or are you using a Wix app in which case it might be restricted to that specific member only…

Search for previous forum posts and see what you find…
https://www.wix.com/corvid/forum/community-discussion/direct-repeater-item-to-dynamic-page