Few issues with Routing URLS using Instant Search; hoping someone can help out with (Sandbox Here).
-
For those Filters that have Spaces in the title, how would I go about replacing those with underscore (_) when
createURL
is pushing URL to browser?
Currently I select the filter “SOLD BY = 12”. URL looks like?Sold%20By=12
. I want it to look likeSold_By=12
. -
Whenever I load a page with filters applied it only works when the filter doesn’t contain any spaces. When I load one with my underscores it will not auto apply the filter like it does the others:
Preloads the Type correctly:https://podt2.csb.app/?Type=Chalice
Does NOT preload correctly:https://podt2.csb.app/?Type=Beer_Mug
I am quite sure these have to do with returning the slug, splitting it and then rejoining with spaces but it is unclear how to implement.