What’s the interest of setting a type of content to a Page?


I see only drawbacks. Let me explain.

When in a workflow I add a “Go to” internal page navigation, if that page has a different type of content set that the one I’m currently on, it’s impossible.

For example, on the profile page of the user, the type could be “User”, and is listed the various Trips that this user has registered.
But the page where the trip is detailed, its content is Trip, so it’s impossible to make a link to it.

The hack I’ve found is to have no Type of Content set to a page, and then use a big group inside who has a type set and where I insert every elements.

Hence my question, what’s the interest of setting content to a page? I see only restrictions.
But I feel I’m not using the properties of Bubble correctly, in the Bubble spirit, what should be the type of my trips pages and user profile page considering I want to link between them? (the trip page has a user_parent assigned and links to it, each user has a profile page that lists all the trips he did).

Many thanks!

PS: I know I could define my user profile page with a Trip type of content, and use a “do a search for Trips, where user_parent = current logged in user”, but that’s too long for each element and with that logic in mind, all my pages would have a “Trip” type, I don’t see the point.

Hey @GammaMat,

This is actually a pretty powerful feature for passing data between pages. It’s optional because not every page’s use case needs it. To make your connection work, if your Trips are listed in a repeating group on the User Profile page, you could have a button within each cell that triggers the navigation:

When button is clicked > Go to Trip Detail Page: Data to send = current cell’s Trip.

The data to send field isn’t restricted to the content type of the current page. It can be pulled from anywhere as long as it’s the same type as the target page. So, if your User page is type User, but you have references to a Trip (or anything else), you’d use those elements (or even a database search) to send the right data.

Some of this also depends on how you’ve structured your data types and the data sources in the elements on your page. If you’re finding it very difficult to retrieve the record, then you may need to re-structure a bit.

Hope this helps!


Gaby | Coaching Bubble
Private coaching, courses, and tons of free resources

1 Like

Thanks Gaby!

To make your connection work, if your Trips are listed in a repeating group on the User Profile page, you could have a button within each cell that triggers the navigation:

When button is clicked > Go to Trip Detail Page: Data to send = current cell’s Trip.

That’s exactly what I did, it works perfectly.
I’m sorry my problem was not well written, it’s my fault. With Links, no problem.
The problem is in a workflow. Say on this user profile page (type is User), you’d have a button “add a new trip”, and that would open the trip_editor page (type is Trip). The workflow would be:


I’m stuck here!
“Data to send” can’t match the two pages I’m linking.
Is there a workaround?

PS: discovering your website thanks to your signature, I’m signup and feel like it’s going to be very useful :blush:

1 Like

Ah, I understand. Ok, a Trip needs to exist first in order for a Trip record to be sent to that page, right? So my suggestion would be to Create a New Trip first, then go to the page.

When Add New Trip button is clicked > Create a New Trip > Go to Page Trip_Editor: Data to send = Result of step 1

If the user changes their mind about adding, they can delete the trip once they’re on the Trip_Editor page.

Also, if the new trip needs to be added to a list on the User record, don’t forget to add that too. For example, if the User type has a field called “Trips” that is a List of Trips, then just make sure after Create a New Trip action you also add Make a Change to Current User: Trips add Result of step 1.

(Awesome! Welcome :slight_smile: I send out tons of tips every week via email, YouTube videos, etc. Feel free to email me too!)

1 Like

Mmh it works that way indeed, but it’s adding a totally empty record in my database and its bypassing all the stuff I did on the “trip add” page :confused:
On this trip_editor page, I guess I should then distinguish people arriving from the user page and when (really) adding their trip, it would change the one we just created ; others that would arrive from other pages where I don’t have to do this trick, it would create a new Trip.:tired_face:
It adds big complications for a simple “link”, but thanks for your input.

I’m wondering if in that case that wouldn’t be easier to remove the Type of content of this page so that I can easily link to it as I have no info to pass to this page, and put all the fields in a big group where I define the type just to display the elements.
But I have 52 issues that appear, have to rework all my fields and workflows!

Ok now I understand when I should set a type to the full pages and when not, it should be wisely chosen, though until now I just defined it because it was easier to display the element on my page.

Thanks Gaby :hugs:
(shouldn’t have I received an email after signup on your website? didn’t receive. Maybe I mistyped my email, I’ll try again tomorrow).

Sorry to resurrect an old thread, but I’m trying to think through the idea of having a default “data” for the type unless it’s overridden by another page sending data. I’m using a dropdown on the destination page that I want to have preselected to the first item, but want that overridden if the user comes from other pages.

So let’s say the page is set to type - color and receives data of from links on other pages of all different colors. I’d like to be able to set the default to be a specific color if the user navigates straight to that page without clicking a link from another page.

I can set up an example if this isn’t very clear.

Create a page load condition:

When Page is loaded only when Current Page’s Thing is empty > Go to this same page with the default value for “data to send”

This would basically reload the page and pass your default only when the Page’s Thing doesn’t exist.

That did it! Got stuck on the “This Page” option instead of “Current Page’s Thing”. Also probably would’ve been lost on the idea to renavigate.

Thank you so much!

1 Like

Is there a way to change the thing without reloading the page?

1 Like

Resurrecting an old thread again, but I still don’t understand what the benefits of setting a page type are.

Total stupid question time here but, while I get that setting a page type means I can send data from one page to the other page, what is the difference between that sending of data from page to page and just searching for data on destination page load?

Thanks!

Hi Nigel, I fear that your reply doesn’t quite fathom the stupidity of my question! I get, from your reply, that those things would be impacted, but I would love to understand why / how etc.

Thank you in advance

Having a page content set basically automates the process of retrieving a thing from the database based on the URL path.

So rather than manually having to create a search for a thing based on the URL path, Bubble does it automatically for you, and allows you to access that thing directly in the editor using Current Page Thing.

As well as that, Bubble automatically creates a ‘page’ on your XML sitemap for each thing in the database for that page.

3 Likes