In my website, filtering of products is done server side by alterining the URLS,
ie. by adding ?q=alpha+beta+gama at the end of the URL if the category is to be filtered for products containing tags alpha, beta & gama
I want to remove "beta" from the url should someone press a button.
Seems easy in non-amp pages by using javascript, but I cant find a way to do it in amp.
Is there a script that can fiind current url and remove some keywords from them based?
I am planning to achieve this with a form. The form will have multiple inputs. On pressing submit button, the input fields in the form will be grabbed and appending to current url. Situation 1:
The current url is website.com/?view=amp
Desirable url is website.com/?view=amp&q=alpha+beta+gama
Situation 2
Current url is website.com/?view=amp&q=alpha+beta+gama+delta
Second desirable URL is website.com/?view=amp&q=alpha+gama