From 563e0cfc05d913a8972b26e988e428abc39b2598 Mon Sep 17 00:00:00 2001 From: Hamish Friedlander Date: Sat, 19 May 2012 14:43:10 +1200 Subject: [PATCH 1/2] BUGFIX: Make CMSes Director rules use new yaml config fragments system --- _config.php | 22 ---------------------- _config/routes.yml | 7 +++++++ 2 files changed, 7 insertions(+), 22 deletions(-) create mode 100644 _config/routes.yml diff --git a/_config.php b/_config.php index 2f11a349..4dc5e95d 100644 --- a/_config.php +++ b/_config.php @@ -7,28 +7,6 @@ define('CMS_DIR', 'cms'); define('CMS_PATH', BASE_PATH . '/' . CMS_DIR); -/** - * Extended URL rules for the CMS module - * - * @package cms - */ -Director::addRules(50, array( - '' => 'RootURLController', - 'admin/bulkload//$Action/$ID/$OtherID' => 'BulkLoaderAdmin', - 'admin/cms//$Action/$ID/$OtherID' => 'CMSMain', - 'admin/asset//$Action/$ID/$OtherID' => 'AssetAdmin', - 'dev/buildcache/$Action' => 'RebuildStaticCacheTask', -)); - -// Default to "pages" view unless a URLSegment within /admin is specified -Director::addRules(20, array( - 'admin//$action/$ID/$OtherID' => '->admin/pages' -)); - -Director::addRules(1, array( - '$URLSegment//$Action/$ID/$OtherID' => 'ModelAsController', -)); - /** * Register the default internal shortcodes. */ diff --git a/_config/routes.yml b/_config/routes.yml new file mode 100644 index 00000000..838d9689 --- /dev/null +++ b/_config/routes.yml @@ -0,0 +1,7 @@ +--- +Name: modelascontrollerroutes +Before: '*' +--- +Director: + rules: + '$URLSegment//$Action/$ID/$OtherID': 'ModelAsController' From f410ccfa0d3b27e148a7b0b3d1c20c65538e428c Mon Sep 17 00:00:00 2001 From: Hamish Friedlander Date: Sat, 19 May 2012 14:43:25 +1200 Subject: [PATCH 2/2] BUGFIX: Make Page panel the default again after the recent addition of AdminRootController --- _config/adminpanels.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 _config/adminpanels.yml diff --git a/_config/adminpanels.yml b/_config/adminpanels.yml new file mode 100644 index 00000000..61f80591 --- /dev/null +++ b/_config/adminpanels.yml @@ -0,0 +1,2 @@ +AdminRootController: + default_panel: 'CMSPagesController'