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/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' 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'