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.
Example
Page 1 (user list): https://bubble.io/page?type=page&name=userlist&id=louisforum&tab=tabs-1
Page2 (profile): https://bubble.io/page?type=page&name=profile&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 I picked up the method I talked about from @brentsum on his Codefree course - maybe heâs tried both methods and has some insight?
@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.
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 ?
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â.