Routes Help Please

OK after quite a few hours got routing working with a dynamic id. (phew)
New problem I have is the routing is replacing [space] with $
eg:
Range%20Bags/Winchester%20Pink%20Rifle%20Gun%20Bag

So how do I make it
Range-Bags/Winchester-Pink-Rifle-Gun-Bag

Any help would be appreciated

Well Peter,
Why are you using spaces in folder/file names?
In web development it’s a really bad idea to have spaces in urls/folders/file names.

Because that’s how they are entered in the database as a category name. If there anyway of stripping the space ?

just for reference, this works
dmx-bind:href="{{Department_Name.replace(" “, “")}}/{{Category_Name.replace(" ", "”)}}/{{Description.replace(” “, “_”)}}”

Added a replace in there as it works fine. :slight_smile:
UPDATE: WAS WORKING FINE

1 Like

I see, you can just use the slugify formatter on the link.

It’s all good buddy, I’ve got it working now, just incorporating the shopping cart.
Most of it done I’m just struggling a little on how to calculate the total of the cart from the repeater so it takes into account the qty’s.
UPDATE: GOT IT :slight_smile:

Have a look at how its working now. 100% Wappler :slight_smile:
http://testing2019.thegunnery.com.au

What I mean is that the slugify formatter is easier to use/maintain than the replace one. It automatically converts ‘this is text’ to ‘this-is-text’.

2 Likes

ah ok, I’ll have a look at that and give it a go. Thanks
Thanks for the info on the shopping cart you did a while back, works perfectly :wink: