diff --git a/code/controllers/CMSMain.php b/code/controllers/CMSMain.php index 25db14d2..272898ca 100644 --- a/code/controllers/CMSMain.php +++ b/code/controllers/CMSMain.php @@ -202,9 +202,10 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr return $link; } - function LinkPageAdd() { + function LinkPageAdd($extraArguments = null) { $link = singleton("CMSPageAddController")->Link(); $this->extend('updateLinkPageAdd', $link); + if($extraArguments) $link = Controller::join_links ($link, $extraArguments); return $link; } @@ -719,9 +720,8 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr $num = $item ? $item->numChildren() : null; if($num) { return sprintf( - '%s', - $controller->Link(), - $item->ID, + '%s', + Controller::join_links($controller->Link(), "?ParentID={$item->ID}&view=list"), $num ); } diff --git a/templates/Includes/CMSMain_TreeView.ss b/templates/Includes/CMSMain_TreeView.ss index 9c54d888..141c5c46 100644 --- a/templates/Includes/CMSMain_TreeView.ss +++ b/templates/Includes/CMSMain_TreeView.ss @@ -22,7 +22,7 @@ $ExtraTreeTools <% end_if %> -
+
$SiteTreeAsUL
diff --git a/templates/Includes/CMSPagesController_ContentToolActions.ss b/templates/Includes/CMSPagesController_ContentToolActions.ss index 62052846..da3eba41 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') %>