From 552f698d4e3e14dd72b1382369a6096c7eba2653 Mon Sep 17 00:00:00 2001 From: mark_story Date: Sun, 27 Sep 2009 00:18:24 -0400 Subject: [PATCH] Adding Routing.prefixes configuration value to core.php. Deprecating Routing.admin --- app/config/core.php | 18 +++++++++++++++++- cake/console/templates/skel/config/core.php | 18 +++++++++++++++++- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/app/config/core.php b/app/config/core.php index 3d4073949..483c5d805 100644 --- a/app/config/core.php +++ b/app/config/core.php @@ -80,11 +80,27 @@ * The value of the define determines the name of the route * and its associated controller actions: * - * 'admin' -> admin_index() and /admin/controller/index + * 'admin' -> admin_index() and /admin/controller/index * 'superuser' -> superuser_index() and /superuser/controller/index + * + * [Note Routing.admin is deprecated in 1.3. Use Routing.prefixes instead] */ //Configure::write('Routing.admin', 'admin'); +/** + * Uncomment the define below to use CakePHP prefix routes. + * + * Set to an array of prefixes you want to use in your application. Use for + * admin or other prefixed routes. + * + * Routing.prefixes = array('admin', 'manager'); + * + * Enables: + * `admin_index()` and `/admin/controller/index` + * `manager_index()` and `/manager/controller/index` + */ + //Configure::write('Routing.prefixes', array('admin')); + /** * Turn off all caching application-wide. * diff --git a/cake/console/templates/skel/config/core.php b/cake/console/templates/skel/config/core.php index 3d4073949..483c5d805 100644 --- a/cake/console/templates/skel/config/core.php +++ b/cake/console/templates/skel/config/core.php @@ -80,11 +80,27 @@ * The value of the define determines the name of the route * and its associated controller actions: * - * 'admin' -> admin_index() and /admin/controller/index + * 'admin' -> admin_index() and /admin/controller/index * 'superuser' -> superuser_index() and /superuser/controller/index + * + * [Note Routing.admin is deprecated in 1.3. Use Routing.prefixes instead] */ //Configure::write('Routing.admin', 'admin'); +/** + * Uncomment the define below to use CakePHP prefix routes. + * + * Set to an array of prefixes you want to use in your application. Use for + * admin or other prefixed routes. + * + * Routing.prefixes = array('admin', 'manager'); + * + * Enables: + * `admin_index()` and `/admin/controller/index` + * `manager_index()` and `/manager/controller/index` + */ + //Configure::write('Routing.prefixes', array('admin')); + /** * Turn off all caching application-wide. *