BUG Fix pages level up link

Fixes https://github.com/silverstripe/silverstripe-framework/issues/5400
This commit is contained in:
Damian Mooyman 2016-09-20 13:02:56 +12:00
parent 685a72d470
commit 18939157f0
No known key found for this signature in database
GPG Key ID: 78B823A10DE27D1A

View File

@ -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'))
);
}