User Generated Marketplace - Creating Dynamic Page

So I’m building a user generated marketplace from users signing up from Instagram. I would like for pages to be created as soon as they signup.

For example
User’s IG handle is: Lorem190
Marketplace url is: marketplace.com/lorem190

1 Like

Dynamic pages aren’t “created” really, they are pages that take an argument like a User.

Have a look at the Sending Data to Pages tutorial again for how this works in Bubble.

Yeah, that seems straightforward in Bubble. Simply:

  1. Pass the data to Bubble and create a user with the data
  2. Create a profile page with type = user in your app, and then each time you create a new user a new profile page will automatically exist for them
2 Likes

Thanks man!

Just started out with Bubble.

1 Like

And, more to point, ANY page that takes data type user will exist for them…,

(I do like your explanation @sridharan.s!)

2 Likes

I’m trying that, but this is a page for them to see, but not for others? How do I update URLs accordingly?

Ok I got it!

But now every user has a long string of characters at the end of their URL like so:
app.com/page/user-1533995389585x371530030621215700

That’s just how Bubble works. There are workarounds, but they are extremely hacky.

The first time I tried it the URL had no extra string. Then after working on it a bit more, it added to the URL.

Yeah, this is a standard Bubble URL unfortunately. It’s definitely easiest this way but like many things with code (Bubble included) what’s easiest to create isn’t what’s best for your users.

One fairly simple workaround would enable you to set the page so that it reads:

There’s also a just slightly more complex workaround that would get you this:

In both cases, you’d do the following:

  1. Use a page that’s type is not set to user.
  2. For each user, add an url-id field in your database (e.g., lorem190) and populate this somehow. It will need to be unique for each user.
  3. Create a group on the page and make it’s type = user.
  4. Run a workflow on page load to get parameter from the URL for the “id” value. Then, look up which user’s url-id that is and load that user to the group (from step 3)
  5. Instead of having all of the elements reference the pages user, you’ll want to reference the group’s user.

The only difference between the two versions I sent is that the 1st is set-up on a page of your choosing whereas the 2nd one is set-up on the homepage (which enables you to cut out the page-name from the URL). Of course, you could have other content on your homepage and if the URL contains an “id” parameter that matches a user in your database then you don’t display the normal homepage content, but instead show the group with that user.

2 Likes

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