Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit 563e0cfc05d913a8972b26e988e428abc39b2598 1 parent 60e7a59
@hafriedlander hafriedlander authored
Showing with 7 additions and 22 deletions.
  1. +0 −22 _config.php
  2. +7 −0 _config/routes.yml
View
22 _config.php
@@ -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
7 _config/routes.yml
@@ -0,0 +1,7 @@
+---
+Name: modelascontrollerroutes
+Before: '*'
+---
+Director:
+ rules:
+ '$URLSegment//$Action/$ID/$OtherID': 'ModelAsController'
Please sign in to comment.
Something went wrong with that request. Please try again.