diff --git a/code/controllers/CMSPageAddController.php b/code/controllers/CMSPageAddController.php index 06330333..45923950 100644 --- a/code/controllers/CMSPageAddController.php +++ b/code/controllers/CMSPageAddController.php @@ -1,5 +1,5 @@ hasExtension('Translatable')) $record->Locale = $data['Locale']; $record->write(); - $form = $this->getEditForm($record->ID); + $this->setCurrentPageID($record->ID); $link = Controller::join_links(singleton('CMSPageEditController')->Link('show'), $record->ID); $this->getResponse()->addHeader('X-ControllerURL', $link); if(Director::is_ajax()) { - $form = $this->getEditForm($record->ID); - return $form->forTemplate(); + return $this->renderWith(array_pop($this->getTemplatesWithSuffix('_Content'))); } else { return $this->redirect($link); }