Add this in routes.php
if ($plugins = App::objects('plugin')) {
$pluginMatch = implode('|', array_map(array('Inflector', 'underscore'), $plugins));
Router::connect(
"/admin/:plugin/:controller/:action/*",
array('action' => null, 'prefix' => 'admin', 'admin' => true),
array('plugin' => $pluginMatch)
);
}
Router::connect("/admin", array('action' => 'index', 'controller' => 'settings', 'prefix' => 'admin', 'admin' => true));
Router::connect("/admin/:controller", array('action' => 'index', 'prefix' => 'admin', 'admin' => true));
Router::connect("/admin/:controller/:action/*", array('prefix' => 'admin', 'admin' => true));
0 comments:
Post a Comment