Use slugs with path segment as list

Hi guys.

I want my multi-page app to have pretty urls, so i made some ‘things’ to use slugs. The user profile page is all working fine and when i load the page i can see my slug in the url like this: https://terminusone.com/version-test/Joan-Peterson.

The issue here is, i have a menu on that page that leads to another pages, so i want the url to look like this (and note that it should look like that even on refresh): https://terminusone.com/version-test/Joan-Peterson/transactions

Note that that the user profile page is designed like a single page app, where each button you click on the menu on that page shows a particular group, like transactions group, profile information group, user articles group. How can i make the url to show like ; https://terminusone.com/version-test/Joan-Peterson/articles

Can someone tell me how to achieve that?

You will need to parse the URL yourself, instead of using bubble built in functionality
So this URL: https://terminusone.com/version-test/Joan-Peterson/articles
Will take you to the page https://terminusone.com/version-test/index
The page’s thing will correspond to the slug Joan-Peterson
You can now use “this website URL” to get the full URL and parse out the second slug (articles) and do something with it.
Similarly you won’t be able to just navigate to page and add the object… you will need to build the URL manually before navigating to it

1 Like

Wow! you seem to have a grasp of these things. when i put a text element on the page( https://terminusone.com/version-test/Joan-Peterson/articles) and do ‘website url get data from page url’ where I use ‘path segment as list’ it actually gives me ’ *https://terminusone.com/version-test

The problem is how do i build the url manually before navigating to it? coz i’ve tried to navigate to the page and add the object, but it doesn’t work?

Please give me a sketchy example if you can.

You would not add the object itself but the object slug. Something like this:
image

Website hone URL gives you: https://terminusone.com/version-test/
Then you add the slug (I used dynamic expression) to get Joan-Peterson
And lastly you can add additional slugs like /articles

I understand that slugs can be used only when we are dealing with things. note that the last object is not a thing. it’s just a static page.

oh. i think i understand. I use a link element to build the link manually.

Right, you can also use “open external website” from a flow

ok. Thanks a lot!

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