Forum Academy Marketplace Showcase Pricing Features

How to get data from page url's path?

Hi, I have a use-case where I need to load the current user based on some id and that id should come from the current url’s path parameter. Also, this page is not being navigated from some other page and I don’t wish to use url parameter. For example, if I browse to the url:
http://www.<(mydomain)>.io/<(uniqueId)> , I should be able to load the user from database on basis of this uniqueId. Can someone please help ?

Make the receiving page of type user and when using the go to page action send a user to that page of type user. Bubble will handle the rest.

Sorry, didn’t get this point:
Where should I send the user from ? I just want to query the user by an id extracted from the url path.

Example in a text element …. complete it with the url parameter name :grinning:

In a group of type user this would read the url parameter and load it onto the group (provided that the url parameter contains the user’s unique id )

I understand that, but in my case I dont want to get this uniqueId from parameter, but from the url path. For example, if url is:, then I should get the data from DB with this userId.

Hi @anantpathak2614,
if you make the receiving page of type user like @cmarchan advised you, you should be able to get the result you want. Just make sure that your Privacy Rules allow viewing other users’ data.
If you want to make the URL more friendly, you can use slugs for that

1 Like

Trying to do something similar. I want to update a page type by pulling from the URL.

I can get the thing in a text element as described above, but how do I update the page type?

E.g. I have a page with a type ‘blog’. I have a URL of

I want to populate the page type with the blog that has the title ‘blog-title’. Not sure what I am missing, but I can’t work out how to do that.

PS. A user could land on this page from a variety of places including external to my bubbleapp, so I can’t use the Go to Page action and send the data from there.

This topic was automatically closed after 70 days. New replies are no longer allowed.