How to replace underscore with hyphen ? |
I know we can declare that in config/routes.php but is there any other solution since there are a lot of controllers ...
Yes, you can declare it on every depending route or with a global config in rutes:
$route['translate_uri_dashes'] = true|false; See here for details (on the bottom): http://www.codeigniter.com/userguide3/ge...uri_dashes Does this work for you? Otherwise you have to overwrite the CI_Router Class. (11-20-2014, 09:40 AM)Rufnex Wrote: Yes, you can declare it on every depending route or with a global config in rutes: That's a CI3 feature.
@Narf: your right .. i dont looked at the board title.
Ok again, there are some usefull examples arround the web. The goal is to overwrite the routing class with an own logic like Create a file in 'application/core' and name it to 'MY_Router.php' PHP Code: class MY_Router extends CI_Router A more complex solution are described here http://upshots.org/php/codeigniter-hyphenated-urls |
Welcome Guest, Not a member yet? Register Sign In |