mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 11:05:55 +02:00
BUG Fixing "Add new" not adding the page to the correct subsite
This commit is contained in:
parent
1538e49e1b
commit
b2ffb7c89e
@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
SiteTree::add_extension('SiteTreeSubsites');
|
SiteTree::add_extension('SiteTreeSubsites');
|
||||||
ContentController::add_extension('ControllerSubsites');
|
ContentController::add_extension('ControllerSubsites');
|
||||||
|
CMSPageAddController::add_extension('CMSPageAddControllerExtension');
|
||||||
LeftAndMain::add_extension('LeftAndMainSubsites');
|
LeftAndMain::add_extension('LeftAndMainSubsites');
|
||||||
LeftAndMain::add_extension('ControllerSubsites');
|
LeftAndMain::add_extension('ControllerSubsites');
|
||||||
|
|
||||||
|
8
code/extensions/CMSPageAddControllerExtension.php
Normal file
8
code/extensions/CMSPageAddControllerExtension.php
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?php
|
||||||
|
class CMSPageAddControllerExtension extends Extension {
|
||||||
|
|
||||||
|
function updatePageOptions(&$fields) {
|
||||||
|
$fields->push(new HiddenField('SubsiteID', 'SubsiteID', Subsite::currentSubsiteID()));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user