php - Change the uri of a module without renaming the class in PyroCMS -


what best way change uri of module without renaming class. example i'd blog module show:

/blog/post-title -> /news/post-title

routes.php?

first added routes.php.

$route['news/([0-9]+)/([0-9]+)/([a-za-z0-9_-]+)'] = 'blog/$1/$2/$3';

then make sure correct links added blog plugin.php.

foreach ($posts &$post) {     $post->url = str_replace('blog/', 'news/', $post->url); } 

Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -