mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
ENHANCEMENT Splitting up CMSMain into CMSPageEditController and CMSPageSettingsController
This commit is contained in:
parent
8af9c546cf
commit
2e2e312da9
@ -29,3 +29,7 @@ else SS_Report::register('ReportAdmin', 'BrokenLinksReport',-20);
|
||||
ShortcodeParser::get('default')->register('sitetree_link', array('SiteTree', 'link_shortcode_handler'));
|
||||
|
||||
Object::add_extension('File', 'SiteTreeFileExtension');
|
||||
|
||||
// TODO Remove once we can configure CMSMenu through static, nested configuration files
|
||||
CMSMenu::remove_menu_item('CMSPageEditController');
|
||||
CMSMenu::remove_menu_item('CMSPageSettingsController');
|
13
code/controller/CMSPageEditController.php
Normal file
13
code/controller/CMSPageEditController.php
Normal file
@ -0,0 +1,13 @@
|
||||
<?php
|
||||
class CMSPageEditController extends CMSMain {
|
||||
|
||||
static $url_segment = 'page/edit';
|
||||
static $url_rule = '/$Action/$ID/$OtherID';
|
||||
static $url_priority = 41;
|
||||
|
||||
function getEditForm($id = null, $fields = null) {
|
||||
$record = $this->getRecord($id ? $id : $this->currentPageID());
|
||||
return parent::getEditForm($record, ($record) ? $record->getCMSFields() : null);
|
||||
}
|
||||
|
||||
}
|
13
code/controller/CMSPageSettingsController.php
Normal file
13
code/controller/CMSPageSettingsController.php
Normal file
@ -0,0 +1,13 @@
|
||||
<?php
|
||||
class CMSPageSettingsController extends CMSMain {
|
||||
|
||||
static $url_segment = 'page/settings';
|
||||
static $url_rule = '/$Action/$ID/$OtherID';
|
||||
static $url_priority = 42;
|
||||
|
||||
function getEditForm($id = null, $fields = null) {
|
||||
$record = $this->getRecord($id ? $id : $this->currentPageID());
|
||||
return parent::getEditForm($record, ($record) ? $record->getSettingsFields() : null);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user