diff --git a/code/controllers/CMSMain.php b/code/controllers/CMSMain.php index 237464ff..4eb61963 100644 --- a/code/controllers/CMSMain.php +++ b/code/controllers/CMSMain.php @@ -202,10 +202,18 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr return $link; } - public function LinkPageAdd($extraArguments = null) { + public function LinkPageAdd($extra = null, $placeholders = null) { $link = singleton("CMSPageAddController")->Link(); $this->extend('updateLinkPageAdd', $link); - if($extraArguments) $link = Controller::join_links ($link, $extraArguments); + + if($extra) { + $link = Controller::join_links ($link, $extra); + } + + if($placeholders) { + $link .= (strpos($link, '?') === false ? "?$placeholders" : "&$placeholders"); + } + return $link; } diff --git a/templates/Includes/CMSMain_TreeView.ss b/templates/Includes/CMSMain_TreeView.ss index 2e9cb6b1..d8d8f39e 100644 --- a/templates/Includes/CMSMain_TreeView.ss +++ b/templates/Includes/CMSMain_TreeView.ss @@ -19,7 +19,7 @@ $ExtraTreeTools <% end_if %> -
+
$SiteTreeAsUL
diff --git a/templates/Includes/CMSPagesController_ContentToolActions.ss b/templates/Includes/CMSPagesController_ContentToolActions.ss index 5c44a42b..b3b8b6b4 100644 --- a/templates/Includes/CMSPagesController_ContentToolActions.ss +++ b/templates/Includes/CMSPagesController_ContentToolActions.ss @@ -1,5 +1,5 @@
- <% _t('CMSMain.AddNewButton', 'Add new') %> + <% _t('CMSMain.AddNewButton', 'Add new') %>