I use Zend URL view helper for building my urls. Everythings works exactly as I'd like to, except one thing: The character used for replacing spaces in the url is a plus (+). I'd like it to be a 'min' (-). How can I change this?
Example: Now: /nl/nieuws/bericht/3/title/nieuwe**+affiches Wish: /nl/nieuws/bericht/3/title/nieuwe-**affiches
Thanks in advcance!
This isn't in the documentation anywhere, but it appears that the Zend URL view helper can take a parameter in it's
$urlOptions
array calledchainNameSeparator
. No guarantee that's what you're looking for, but trying playing with that and see if it changes anything.This is likely happening because, by default,
Zend_View_Helper_Url
willurlencode()
what you send it, which would translate spaces into+
. My suggestion to you would be to create a new view helper for the type of URL in your code that needs the special inflection.Something like:
This way the spaces are changed for whatever necessary route parameters before URL encoding happens by the router.