Forum Academy Marketplace Showcase Pricing Features

How to insert a dynamic page title depending on the source page the user came from

Hi there. I’m new to bubble and am absolutely loving it even though I’m still feeling around and getting a sense of things. This may be an easier one but I’m reaching out for help nonetheless. I’m building a marketplace app. I’m trying to create a page template such that the Header of that page is dynamically displayed based on the source page the user came from. So for e.g. my home page has the following links: (1) buy & sell, (2) cars, (3) services, (4) jobs. Each of these is a thing in the database (called category 1. Because I have sub-categories, category 2, that are lists of things for each of these and then a sub-category, category 3 of those as well).

Now I want to have a page such that the header on the page is either “Buy or Sell” or “Cars” or “Services” etc. depending on which source link the user clicked on the home page.

How would I accomplish this? I know it has to do with pulling dynamic data from my database, but how do I do this to factor in the link the user clicked on?

Thanks.

Hi SeanB,
welcome to Bubble.

  1. When you click a button on your homepage e.g. cars,
    use the workflow: Navigation -> :
    Go to page, and select send more parameters to page
    Here create a key e:g “from” and set it to “cars” or also dynamic data is possible such as “current cell’s category’s text” or similar.
    so when the user clicks, cars turns up in the URL.
    2019-10-21%2016_35_31-Todolisttool%20_%20Bubble%20Editor
  2. On the receiving site or header: use dynamic data: Get data from page URL
    and select they key “from”
    So now the receiver will take anything after the from= in the URL and display this
    So in this case it will show cars. For the other buttons, you can do the same with services for step 1.
    2019-10-21%2016_35_57-Todolisttool%20_%20Bubble%20Editor
    Note the first from in the screen is text: the “get from from page URL” is dynamic data
    hope this is clear
    feel free to pm me if you have further qs.

happy bubbling,
Julius

For free tips & step by step lists for Bubble & more check https://tiplister.com/

Thank you. This is very helpful. I’ll give this a try and let you know in case I need any further help. Thanks so much once again.

Hi @TipLister / Julius,

I have the same problem. But I am using links to go to a page with dynamic url. I have the step 2 from above for my destination page. However, since the source is a link, the only option I am getting is below:

Can you suggest some solution? I am looking into the SEO for my page and have the below issue regarding title:


My Settings:

Destination settings:
Page Load WorkFlow:
On Page:

what is your reasoning behind using do a search for, as well as “find & replace”

your link can be website home urlCard_game_selector?&ref=parentgroupsthingsuniqueid or currentpagethingsuniqueid to send one thing over to the page

Then on the receiving page in a group you can use “Get data from page url”, with ref=
then make it not type text but type the datatype of the uniqueid you sent over
then in group you can display parent groups things title

if that doesnt help check this entire playlist i made

Thank you for the explanation and saw the videos as well. Reason for both url & find and replace: I have space in the game names, so it is to replace space with “_”

I have made the following changes as per the suggestions:
Source:


Destination:

Checked in google and the results are same. Will google take few hours to reflect the change?
The challenge here is, I don’t have a work flow when I click the links and I want links for SEO (or should I switch it back to like work flow instead). I am doing all these only for SEO. Functionality wise, all works great!

oh that was not clear that you only do this for SEO.
there is no need for the find replace all that stuff because of something called a slug

Just an example:
If your page is type recipe
Then when a new recipe is created do not only use “create a new thing” recipe, where name = inputs value e.g. pizza for 3 people
but in step 2 you can use the workflow “set a things slug”:
select the recipe created and make its slug the name

then whenever you go to the page of that recipe, pizza for 3, and lets say that page is called recipe
then your URL will read homedomain.com/recipe/pizza-for-3

Or are you already using slugs and looking for an even more specific use-case?

when you go from the page with all recipes to a singular recipe just use “navigation go to page X” and send the current cells recipes to the new page.

Yes functionality wise, everything looks good. Just that, my source is a Link (to maximize internal links!) and that way I will have the game selected (link) appear in t he URL. The click action (on link) takes the user to the respective game page. works good - no problem

Issue is with the Title of this game page (for SEO). It shows in google like this:


Even though I have the below settings in the destination page property:

@TipLister

Sorry to keep bugging, I tried everything to get the title updated! Can you please review above?