How/can you change URL dynamically based on group shown?

Hello. My app is intended for mobile so it’s single page, meaning instead of having navigation to pages we use hide/show groups instead. So how can I make it so that based on the group shown, the URL changes without having to navigate out/reload the page?

The “show x group when Get data from page URL” isn’t really the best solution because it’s very easy for the user to see what was shared to them, eventually browse other things but keep having that same URL. So when they reload the page or view other things and try to share them they still carry the same URL since the page never changed because all that indicates “pages” are hidden and shown groups in our single page app.

For example. If you’re shared a video I use the “get data from page URL” to show you that specific video using hide/show workflows on page load conditionals, but if you keep browsing and you wanna suddenly take the URL of what you’re seeing you should be able to share where you’re at right? Not the link of the video you watched 2-10 videos ago… This is where the problem is. I do have manual “share” buttons that share the right link of what you see, but if you happen not to use it and instead decide to just copy the link your browser shows it’ll be wrong and that’s problematic.

Imagine it working like this:

If you’re in index you’d be in

When you enter, say, a listing (hide and show a group) you’re now in

When you get out of that listing (hide listing, show home), back at

Let’s say then you enter someone’s profile, so you’re at

All with just hide and show workflows for groups, never a “Go to page” or anything. Is it possible?

edit: meant parameters…

Hey! interesting question. I’d think url parameters are still the best way to go instead of using some of the plugins that deal with routing. Whenever there’s a significant event (e.g., clicking a different video vs. reading the comments on the initial video), you can just replace/add a parameter in the url. Sharing the url at any point therefore will show the video the sharer is viewing currently.

Hi thanks for answernig, I made a mistake I did mean parameters. That’s the link we use to share things. Usually something like, for example.

But yeah, still how to change those dynamically? I’m not sure what you mean by replace or add a parameter, do you mean it somehow with workflows?

when a user clicks on s/t that is considered a changing of the product →
NOTE: it gets a bit tricky if there a bunch of other parameters that you want to retain.

Hey, I recommend watching this video I made on URL paths, might help you with your SPA.

With this method, you’ll get pretty URLs and you’ll be able to share the URL to whatever screen you are viewing to another person.

1 Like

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