You mean a path? If you send someone to myapp.com/pages/jack-frost, then you can lookup a record in your database where a specific field matches the path “jack-frost”
This means that each Thing in your database would need a unique value for that path (text) field so that when you load that page with the path value, it only matches 1 Thing.
Let’s say the name of that field is “slug.” The expression would look something like this:
Search for Thing (slug = Get path from page URL) :first item
“Get path from page URL” is found via “Get data from page URL” > change parameter to path
Google will index it… MAYBE… if you link to it. Issue is: Googlebot does not wait around for your shenanigans to complete.
So, best bet: you make a page called index_this. You put it in your sitemap. There, you construct dyno-links to all of the things.
Some may get indexed. Some may not.
This is the downside to all this stupid jacking around people do with these custom URL schemes. Bubble simply does not allow us to do it the right way, so your mileage may vary, as they say.
But this applies to any dyno-page. If you want dyno-page/unique_id indexed, you need to have a page where the static versions can be found.
Again, since those URLs are dynamic, u have to make this happen before the Googlebot says eff off and goes away.
In case it’s not obvious: the page I’m talking about has a minimally styled RG on it that displays the list of pages you want indexed, as links to the dynamic destinations.
I know this is “duh”, but it has to be said for those new to this idea.
I have this working, but it won’t work on the index page, understandably. E.g. if I type in www.example.com/about, Bubble looks for an ‘about’ page and returns a 404. Is there any way to do this on the index page?
Hey @romanmg Gaby,
I just watched your video on this (it’s awesome!), and I was wondering if you could help out with creating unique-slugs?
I’m not sure how to do the following:
-When a company profile is created then “use the Company name as Slug” (I got this part)
-But then how can I check if there was already a company in the database with the same name/slug name in the database? And in that case, I would like to add a +1 to the Slug name.
So something like
-www.page.com/adidas
-and if there was already a company named Adidas then it would be named www.page.com/adidas-1
You do that by first searching your DB for that company:count and then adding +1 to that. And you do all that inside the slugify plugin, so that you can use the result of that step in the next step where you persist the new company to the DB with the new name and slug.