mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
BUGFIX: Make CMSes Director rules use new yaml config fragments system
This commit is contained in:
parent
60e7a5960f
commit
563e0cfc05
22
_config.php
22
_config.php
@ -7,28 +7,6 @@
|
|||||||
define('CMS_DIR', 'cms');
|
define('CMS_DIR', 'cms');
|
||||||
define('CMS_PATH', BASE_PATH . '/' . CMS_DIR);
|
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.
|
* Register the default internal shortcodes.
|
||||||
*/
|
*/
|
||||||
|
7
_config/routes.yml
Normal file
7
_config/routes.yml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
Name: modelascontrollerroutes
|
||||||
|
Before: '*'
|
||||||
|
---
|
||||||
|
Director:
|
||||||
|
rules:
|
||||||
|
'$URLSegment//$Action/$ID/$OtherID': 'ModelAsController'
|
Loading…
Reference in New Issue
Block a user