BUG Fixing "Add new" not adding the page to the correct subsite

This commit is contained in:
Sean Harvey 2013-05-28 12:17:16 +12:00
parent 1538e49e1b
commit b2ffb7c89e
2 changed files with 9 additions and 0 deletions

View File

@ -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');

View File

@ -0,0 +1,8 @@
<?php
class CMSPageAddControllerExtension extends Extension {
function updatePageOptions(&$fields) {
$fields->push(new HiddenField('SubsiteID', 'SubsiteID', Subsite::currentSubsiteID()));
}
}