Merge pull request #135 from silverstripe-scienceninjas/feature/config-enhancements

Feature/config enhancements
This commit is contained in:
Sam Minnée 2012-05-20 19:03:57 -07:00
commit b13b5fefdb
3 changed files with 9 additions and 22 deletions

View File

@ -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.
*/

2
_config/adminpanels.yml Normal file
View File

@ -0,0 +1,2 @@
AdminRootController:
default_panel: 'CMSPagesController'

7
_config/routes.yml Normal file
View File

@ -0,0 +1,7 @@
---
Name: modelascontrollerroutes
Before: '*'
---
Director:
rules:
'$URLSegment//$Action/$ID/$OtherID': 'ModelAsController'