Take the 2-minute tour ×

Doe any body have examples of setting up the routes.php table when using plugins and prefix routing in CAKEPHP e.g.

a shops controller, using the manage prefix to access certain management functions for the seller

so /manage/shops/edit amps to manage_edit in shops_controller.php

and then placinging this in


share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

In your core.php there is a configuration value called: Routing.prefixes you need to set the manage prefix there:

Configure::write('Routing.prefixes', array('admin', 'manage'));

Now all calls to URLs like /manage/controllerName/actionName will go to: controllerName::manage_actionName

and all calls to URLs like /admin/controllerName/actionName will go to: controllerName::admin_actionName

For plugin routing in the routes.php file:

Router::connect('/shops/edit', array('plugin' => 'pluginName', 'controller' => 'shops', 'action' => 'edit'));

This is all that is needed.

share|improve this answer
add comment

Your Answer


