diff --git a/_config.php b/_config.php index 0fb43491..6c1deee0 100644 --- a/_config.php +++ b/_config.php @@ -1,10 +1,5 @@ register( 'sitetree_link', [SiteTree::class, 'link_shortcode_handler'] ); - -CMSMenu::remove_menu_class(CMSMain::class); -CMSMenu::remove_menu_class(CMSPageEditController::class); -CMSMenu::remove_menu_class(CMSPageSettingsController::class); -CMSMenu::remove_menu_class(CMSPageAddController::class); diff --git a/code/Controllers/CMSPageAddController.php b/code/Controllers/CMSPageAddController.php index 37f1e221..59a3a5c1 100644 --- a/code/Controllers/CMSPageAddController.php +++ b/code/Controllers/CMSPageAddController.php @@ -32,6 +32,8 @@ class CMSPageAddController extends CMSPageEditController private static $menu_title = 'Add page'; private static $required_permission_codes = 'CMS_ACCESS_CMSMain'; + private static $ignore_menuitem = true; + private static $allowed_actions = [ 'AddForm', 'doAdd', diff --git a/code/Controllers/CMSPageEditController.php b/code/Controllers/CMSPageEditController.php index 271d5929..67dcfb38 100644 --- a/code/Controllers/CMSPageEditController.php +++ b/code/Controllers/CMSPageEditController.php @@ -28,11 +28,13 @@ class CMSPageEditController extends CMSMain private static $required_permission_codes = 'CMS_ACCESS_CMSMain'; + private static $ignore_menuitem = true; + private static $allowed_actions = [ 'AddToCampaignForm', ]; - public function getClientConfig() + public function getClientConfig(): array { return ArrayLib::array_merge_recursive(parent::getClientConfig(), [ 'form' => [ diff --git a/code/Controllers/CMSPageSettingsController.php b/code/Controllers/CMSPageSettingsController.php index 34353c7c..bf401573 100644 --- a/code/Controllers/CMSPageSettingsController.php +++ b/code/Controllers/CMSPageSettingsController.php @@ -15,6 +15,8 @@ class CMSPageSettingsController extends CMSMain private static $required_permission_codes = 'CMS_ACCESS_CMSMain'; + private static $ignore_menuitem = true; + public function getEditForm($id = null, $fields = null) { $record = $this->getRecord($id ?: $this->currentPageID());