I’m trying to tidy up my URLs and keep them readable. I’m making a CRM type software that operates from a single page, hiding and displaying windows according to the URL.
I want to create something like bubble.io/users/profile without actually navigating away from the main page. I have been achieving this by using Go to Page Index and setting a page param like page=profile.
The only way I can see to do what is I want is to add more and more params, page=profile&profile=me but this looks really untidy.
When I add a / to the arbitrary text for any param, it comes through as %2F in the URL.
Any way to work around this, or a better way to achieve my desired outcome?
If you want to make a one page app, you have different ways to do that:
page parameters
page url
custom states
If you want to use URLs for a better readability, you can go like that
Your page name in bubble is “users”. (exemple.com/users)
Inside this page, you create a group “profile”, with a conditionnal visibility depending on the URL path: When > get data from page url > type "path segment as a list > Item #2 > is > "profile"
In you page let say you have a button to redirect them to their profile page, the button is: Go to page Users > data to send > arbitrary text > "profile"
This way, the page do not refresh but the url change, you don’t have to use url parameters.
You can also create any url you want by adding “/” in the arbitrary text for “data to send”, for example : yoursite.com/users/profile/edit/confirm
The “/” is transformed to %2F only in page parameters, not page data.
You can also do that from the index page, but be aware that if you add “data to send” to page index, /index/ will be shown as the first path. In your case the result will be yoursite.com/index/users/profile
Also, if what you want to achieve is a dynamic auto generated page url depending on the user name or other data, ( for example yoursite.com/users/username, or yoursite.com/blog/myarticle), you should look about page data type and slugs.