Go to page: manipulate current query parameters

Currently, there isn’t a way to keep current parameters or selectively modify parameters for “go to page” action.

Example use case

  • You have a button in a reusable header that opens some popup (for instance, cart)

  • You want to reflect the UI state change via URL
    (e.g. &cart=1)

  • You have several pages that handle different URL parameters
    (e.g. 1 – a product listing page allows users to filter through list via size, color, and material parameters www.site.com/products?size=m&color=brown&material=cotton)
    (e.g. 2 – a settings page that has tabs to show different sections www.site.com/settings?tab=notification or ?tab=privacy, etc.)

  • This cart open button can be clicked on any page that has the reusable header.

  • Since you define “go to page” action in a reusable element, you don’t want to “go to page” with all parameters that will be used on all pages. That will become something like www.site.com/settings?size=&color=&material=&tab=privacy in a settings page. (or www.site.com?size=&color=&material=&tab= in the index page that doesn’t deal with parameters at all)

So, if we have an option to:

  • add a query on top of current parameters and
  • remove a query from existing query parameters

We could have more dynamic URL state expressions – Any change we can have this feature?


Edit: I posted the thread as unfinished so I finished up my writing.

1 Like

I’m facing that issue right now.
I found kind of a workaround but it’s not very efficient:
Instead of using “go to page”, I’m using “Run Javascript” action do perform the modern HTML5 technique to edit url without refreshing the current page
history.pushState(‘data to be passed’, ‘Title of the page’, ‘/test’);

But by doing this through “Run Javascript” action, you won’t have that new url updated in bubble (check in a text element for example):

sample page, with “debug_mode=true” parameter

click on “url part1” button to trigger Run Javascript action where it calls history.pushState()

So yes it definitely would be helpful feature being able to add or remove a parameter (leaving the other parameters the same).
To be honest I was surprised and thought I was the one who was missing something when I faced that issue… Since it should be a default, must have one!! :confused:

2 Likes

Hi there - just launched a feature, so you can change URL parameters more easily! Learn more: [Feature] Enable navigating to a dynamic page