BUGFIX: Make CMSes Director rules use new yaml config fragments system

This commit is contained in:
Hamish Friedlander 2012-05-19 14:43:10 +12:00
parent 60e7a5960f
commit 563e0cfc05
2 changed files with 7 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.
*/

7
_config/routes.yml Normal file
View File

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