Same page for multiple listings?

Hello!

I’m new to bubble, and I imagine there is a very easy fix for this, but I can’t seem to figure out the solution by myself or in any of the documentation.

Using the example of an airbnb clone, lets say in the create a new listing page i want to have 3 (or more) options via radio buttons. Lets call them 1 bedroom, 2 bedrooms, and 3 bedrooms.

Now, in the header, there should be 3 text links, one for each of those bedroom amounts.
I want to create one listing page, and just pass the information to that listing page that the user is looking at just the 1 bedrooms, or 2 bedrooms, or 3 bedrooms.

So, i can easily create the listings by using a repeating group.

However, my basic question is…
I want to create a dynamic title (h1) at the top of the listing page, that says either 1 bedroom, 2 bedrooms, etc. depending on what the user clicked. I can’t seem to figure out how to do that.

Right now i have a “thing” that has a “Bedroom amount” field that is set to text. (no, i don’t want to switch this to number)

Any ideas would be much appreciated.

ALSO, is there any live chat for bubble users? Slack, IRC, etc?

You can send things to pages in a parameter.

okay great!

But just played around with it and can’t seem to figure out how to use.

Can you please give me a brief, high level explanation?

EDIT: also looks like i was using text in the header instead of links, but still can’t seem to crack this egg. Any help would be appreciated.

@NigelG, sorry to tag you specifically, but could you please offer more help here?

Yes, will do shortly.

There are a few ways you can pass data from page to page.

  1. Normally you are passing a thing around, so setting a content type on a page (works well for lists of things)
  2. You can store something on the database (often the User)
  3. Page parameters was added fairly recently, and this is what I have used here.

So I am just passing a text value from one page to another.

If the values are on a thing (so you have a list of things on the page) then doing this in method 1) will be easier.

Have a look, and we can refine until you are happy it works with your application. Often these things are better done in the forum app, rather than having to explain your idea.

1 Like

Ok great!

So your app works exactly as I would like mine to.

However, 2 things.

  1. I’m not sure how you made it. I set keys in the 3 options as you did, but the dynamic text on the goto page…“Get Type from page URL” is not an option for me. How did you get that as a dynamic option?

and

  1. this is a list of things. The page is a list of 1 bedrooms, 2 bedrooms, etc. So how would I accomplish this using option #1? I’ll fill in the same 2 pages you used on the forum app to show you where i’m at.

EDIT:
Looks like my workflow for something else was bad, but i got this to work.
Okay, got it to work the way Nigel’s example works.
Here is the way things are set up:

Double click background and set type of content


Set links destination page, and create a key (number of bedrooms, color, genre, etc.) and give each link their own “=” (1 bedroom, blue, rock, etc.)

**This was the part that i couldn’t figure out. the Header text, which you want to change depending on what they clicked, should be set to “Get ? Parameter from page url”. Select that option, then it will turn blue. Then, you must click the blue “Get ? Parameter from page url” to bring up this little “Get type from page URL” input, and in the parameter name box, type in the key you created at image one (number of bedrooms, color, genre, etc.) I believe it is case sensitive **

It should work!

Is that working now ?

Passing things around in parameters is good when the data you want to pass isn’t on the database.

If you do have a list of “colours” on the database (rather than allowing the user to type it in) then sending a thing might be best.

hmm, yes it is working, but i believe what i want to do is from the database rather than parameters.

every listing thing has an id of bedrooms, (formatted as text, either as 1 bedroom, 2 bedrooms, or 3 bedrooms.)

But i can’t figure out how to get it from the database. That was what i was initially trying to do.
this solution works, but is a workaround, and is not as scalable i don’t think.

would you mind helping me figure out how to get it from the database?

Yes, so you want to send the listing you have just created ? Or is the link separate ?

Not sure about how you see this working. You create listing(s) … then click on the links in the header ? Then you just get listings for that type ?

So, creating a listing is something only sellers do, correct?
So they create a listing and use a radio button to select how many bedrooms their place is, because we only allow 1-3 bedrooms.

Now, if someone comes to the website looking for a place to rent, they can look at the top header links and select how many bedrooms they want, and just see listing with that number of bedrooms.

I guess you can also think of it as a filter in an ecommerce store? If you click on shoes you will only see shoes, pants, only see pants (and it will say shoes or pants etc. at the top)

Ok, got it :slight_smile:

Ok, I created a new type called Bedrooms. This makes it a bit more scalable.

The radio buttons work on this, as do the links.

You could then save Bedrooms as a field type on Listing, and do the search on that on the listings page.

Thank you, I will look at it tonight and add my comments!

Hey!

Okay, so i am a bit confused by this.

on the page with the listing form,
I see the heading links that display are created dynamically, “Current cells Bedroom’s Selection”
and
I see that the radio buttons are also created dynamically, “Search for Bedrooms”
but
I can’t seem to find where you defined these dynamic choices.

viewing the live preview shows me both of those areas are filled with one bedroom, two bedrooms, and three bedrooms, but how?

I pulled them in from the new Bedroom Thing. That way you can add new options and they appear.

but in the data tab, the bedroom thing doesn’t have any fields or list or anything.

at some point you must have initialized the data in some way, correct?

also, thank you so much for going step by step with me through this!

Odd, might be a bubble quirk.

It is there :slightly_smiling:

thats odd, closed and restarted browser, cleared cache, tried different browser…but it’s not showing.

Very odd !