Okay so in my app I want that when users click on the username of the people then they should be taken to the profile of that specific person. As of now I have a page where the profile of the current user is shown. How can I achieve this ?
For each user, have a text field that stores their profile URL, then you make the usernames a link to an external website (even though it’s not) and dynamically feed in the profile URL as the link destination.
Did not get the last part . How to dynamically feed feed in profile url
Actually, let me reformulate my answer
Each user should have a ‘username’ field. You should make sure this unique.
You should have a repeating group showing all, or a subset of users. One of the elements in this repeating group should be a text element, and it should be dynamic showing that user’s username.
You should set up a workflow so that when that text element is clicked, it opens an external web page (really a web page from your website) - your profile page - and affixes the user’s username as a parameter to the end of the URL.
Then you can customise the data displayed on the profile page to be specific to that user, by grabbing the username from the URL and then searching and returning the user attached that that username (hence why usernames need to be unique)
Another way is to pass the current user to the page/group. So let’s say that on group/page 1, you have a repeating group of users and on group/page 2 (with content type of user) is a profile page. You can have an icon or button in your repeating group cell that sends the current cell’s user to group/page 2.
Page 1 (user list): https://bubble.io/page?type=page&name=userlist&id=louisforum&tab=tabs-1
@louisadekoya - Good alternative. Any idea if your method results in the profile page loading more quickly?
@andrew1, thanks. To be honest, I’m not sure. The method I shared uses a feature (‘current page’s user’) that seems to have been built specifically for this purpose, so perhaps it will load quicker. As always, there’s more than one way to do things it Bubble and it often just comes down to personal preference.
@louisadekoya Well I tried your method but I still get the profile of the logged in user and not the user who created the post.
What is the problem ?
Thanks a lot but things are still overwhelming for me.
In my database I have a field by the name “unique_id” which stores the unique id of the user once created.
How should I proceed further ?
@akul3007 - You’re getting there.
First, you need to add a ? after the last / of the URL (before ‘unique ID’)
Then, you need to click on the ‘Get data from page URL’ and another window will popup:
Then where it says parameter name, type “unique_id”
Also @akul3007, the mistake you’re making with @louisadekoya 's solution is, with ‘Data to send’, you’re sending the user who’s logged in. Rather, if you’ve got a repeating group of type User, you need to send the 'Current cell’s user".
Okay, so I have made some change in the database. Now whenever the user creates a post and his name appears on the page a unique_id is created in the database which is equal to the unique id of the user(which was created during registration of the user).
But on checking my database I can’t see the saved unique_ids.
Plus the below is the page where the username will be displayed clicking on which the user will be redirected to the page of the other user
Can you share a link to your app… easier to diagnose that way.
this is the page.
@akul3007 - I’ll take a look later today.
It’s working. I made some change in my page and now I have repeating group to use.
@andrew1 Well I when a user makes an account in my app he is required to make a username. I want to ensure that the username should be unique. How could that be achieved ?
Did you not get your answer in here?
Okay, I know this is a bit late, but because this post is similar to my problems, I thought I’d post on this, so the external website is working, but now, the data is my problem, it’s having troubles knowing which profile is which, I tried doing “Search for User” then on that popup, I did for example “Profile_Desc = Get profile_desc from page URL” and then on that I did “Parameters” “profile_desc” and “type” “text”, and then after that I went back to the main section and did “Search for User’sProfile_Desc” and it’s having some trouble knowing what it’s doing. I tried doing “search for Users:firstlist(Or something along that line)'sProfile_Desc”.