Permalink
Browse files

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

  • Loading branch information...
1 parent 60e7a59 commit 563e0cfc05d913a8972b26e988e428abc39b2598 Hamish Friedlander committed May 19, 2012
Showing with 7 additions and 22 deletions.
  1. +0 −22 _config.php
  2. +7 −0 _config/routes.yml
View
@@ -8,28 +8,6 @@
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.
*/
ShortcodeParser::get('default')->register('sitetree_link', array('SiteTree', 'link_shortcode_handler'));
View
@@ -0,0 +1,7 @@
+---
+Name: modelascontrollerroutes
+Before: '*'
+---
+Director:
+ rules:
+ '$URLSegment//$Action/$ID/$OtherID': 'ModelAsController'

0 comments on commit 563e0cf

Please sign in to comment.