Skip to content
This repository
Browse code

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

  • Loading branch information...
commit 563e0cfc05d913a8972b26e988e428abc39b2598 1 parent 60e7a59
Hamish Friedlander authored May 19, 2012
22  _config.php
@@ -8,28 +8,6 @@
8 8
 define('CMS_PATH', BASE_PATH . '/' . CMS_DIR);
9 9
 
10 10
 /**
11  
- * Extended URL rules for the CMS module
12  
- * 
13  
- * @package cms
14  
- */
15  
-Director::addRules(50, array(
16  
-	'' => 'RootURLController',
17  
-	'admin/bulkload//$Action/$ID/$OtherID' => 'BulkLoaderAdmin',
18  
-	'admin/cms//$Action/$ID/$OtherID' => 'CMSMain', 
19  
-	'admin/asset//$Action/$ID/$OtherID' => 'AssetAdmin', 
20  
-	'dev/buildcache/$Action' => 'RebuildStaticCacheTask',
21  
-));
22  
-
23  
-// Default to "pages" view unless a URLSegment within /admin is specified
24  
-Director::addRules(20, array(
25  
-	'admin//$action/$ID/$OtherID' => '->admin/pages'
26  
-));
27  
-
28  
-Director::addRules(1, array(
29  
-	'$URLSegment//$Action/$ID/$OtherID' => 'ModelAsController',
30  
-));
31  
-
32  
-/**
33 11
  * Register the default internal shortcodes.
34 12
  */
35 13
 ShortcodeParser::get('default')->register('sitetree_link', array('SiteTree', 'link_shortcode_handler'));
7  _config/routes.yml
... ...
@@ -0,0 +1,7 @@
  1
+---
  2
+Name: modelascontrollerroutes
  3
+Before: '*'
  4
+---
  5
+Director:
  6
+  rules:
  7
+    '$URLSegment//$Action/$ID/$OtherID': 'ModelAsController'

0 notes on commit 563e0cf

Please sign in to comment.
Something went wrong with that request. Please try again.