From 18939157f0e595217556c9dfe86d68b6b1cd989b Mon Sep 17 00:00:00 2001 From: Damian Mooyman Date: Tue, 20 Sep 2016 13:02:56 +1200 Subject: [PATCH] BUG Fix pages level up link Fixes https://github.com/silverstripe/silverstripe-framework/issues/5400 --- code/Controllers/CMSMain.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/Controllers/CMSMain.php b/code/Controllers/CMSMain.php index 41e36284..3b702863 100644 --- a/code/Controllers/CMSMain.php +++ b/code/Controllers/CMSMain.php @@ -859,9 +859,11 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr new GridFieldPaginator(self::config()->page_length) ); if($parentID){ + $linkSpec = $this->Link(); + $linkSpec = $linkSpec . (strstr($linkSpec, '?') ? '&' : '?') . 'ParentID=%d&view=list'; $gridFieldConfig->addComponent( GridFieldLevelup::create($parentID) - ->setLinkSpec('?ParentID=%d&view=list') + ->setLinkSpec($linkSpec) ->setAttributes(array('data-pjax' => 'ListViewForm,Breadcrumbs')) ); }