Create custom member page unique to each user

Hello all,

I am trying to add a members area in my website where the admin (me in this case) could post data unique to each user that only the user can see. For instance, each user can sign up and can see their data that was posted by the website admin. Each user has unique data and can’t see other users data. Hope I made it as clear as possible, thanks in advance.

Hi Ahmad,

I know how to achieve this! Ok, so you added a private members page right? Then, add a repeater. Add a database called “notifications”. Add the field “email”(field type as TEXT) & the field “notification”(field type as rich text). Then publish your site. Then, connect the repeater to to database(using a dataset). Only connecting the “notification” field will do. Then you add this code to the member page:

import wixUsers from 'wix-users';
import wixData from 'wix-data';

    $w.onReady(function (){
        $w("#listRepeater").show(); //your repeater ID
 let user = wixUsers.currentUser;
 let userEmail;
    user.getEmail().then( (email) => {
        userEmail = email;
        $w("#dynamicDataset").onReady(() => {
        $w("#dynamicDataset").setFilter(wixData.filter()
        .eq("email", userEmail)
        )   
        })
    });

});

The repeater Id is #listRepeater. The dataset Id is #dynamicDataset.

So, in this code, the notification that has the user’s email will show only to that member who is logged in with that message. So, you can write your first notification & the email address of the user you want the message to see (write it in your database).

Hope this is what you where wanting to achieve. You can also create a private members chat with this(I am using it like that).

Arthur

1 Like

I honestly really appreciate your help Arthur, I’ll follow your steps and let you know how it went

Hi there,

I’m incredibly new to posting code in there, but am trying to accomplish the same thing. When I entered the code on the page, it gave me messages like these: “#listRepeater” is not a valid selector. It does the same for the #dynamicDataset. Are those just placeholders for something I should be entering there?

For what it’s worth I have no coding experience whatsoever, so any help is appreciated!

Thank you!

@careerpathzach , Hi.
#listRepeater is the repeater’s ID .

#dynamicDataset is the dataset’s ID that is connecting the repeater to the database.


This might help you:
https://support.wix.com/en/article/corvid-working-with-the-properties-panel

I appreciate the help!

Perhaps you can help me with another question?

I work for a non-profit whose trying to develop a website to serve our clients virtually. Our clients are assigned Case Managers who specifically work with them on their case. What we’re picturing is someone having a unique member page that has a “Contact Case Manager” button/page of sorts, that lets them book an appointment or contact their specific case manager.

Would the code above be reworked to support that sort of thing? Do you know if that’s possible through Wix’s Booking App or would we want to use something Calendly in its stead?

@careerpathzach , Hi
I haven’t worked with the Wix bookings app before so I can’t tell if you can do it. I did however find an example tutorial that might just be what you are looking for: https://www.wix.com/corvid/example/quick-book-and-pending-appointments
I am sorry if this isn’t what you wanted to achieve.

Thanks man…