You are here:  » URL encoding with external.php

Support Forum



URL encoding with external.php

Submitted by pieter on Sun, 2010-10-24 09:55 in

Hello,

I'm using external.php

But I just noticed that products called by external.php have an URL like this: www.mysite.com/product+product.html

When products are called with search.php I get www.mysite.com/product-product.html

So external.php uses a + in the URL, and search.php uses - in the URL.

I would like it all to be -.
How can I modify this in external.php?
I tried some things with productHREF and urlencode, but it didn't work out.

Thanks in advance,

Pieter.

Submitted by support on Sun, 2010-10-24 11:10

Hi Pieter,

Where you have been experimenting using urlencode(), use it together with tapestry_hyphenate(), for example:

urlencode(tapestry_hyphenate($product["normalised_name"]))

Cheers,
David.
--
PriceTapestry.com

Submitted by pieter on Sun, 2010-10-24 12:22

That worked, thank you.