mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Breadcrumb/back nav in ModelAdmin now retains search params
This commit is contained in:
parent
8717deca82
commit
f7c8778466
@ -445,8 +445,14 @@ abstract class ModelAdmin extends LeftAndMain {
|
|||||||
|
|
||||||
// Show the class name rather than ModelAdmin title as root node
|
// Show the class name rather than ModelAdmin title as root node
|
||||||
$models = $this->getManagedModels();
|
$models = $this->getManagedModels();
|
||||||
|
$params = $this->request->getVars();
|
||||||
|
if(isset($params['url'])) unset($params['url']);
|
||||||
|
|
||||||
$items[0]->Title = $models[$this->modelClass]['title'];
|
$items[0]->Title = $models[$this->modelClass]['title'];
|
||||||
$items[0]->Link = $this->Link($this->sanitiseClassName($this->modelClass));
|
$items[0]->Link = Controller::join_links(
|
||||||
|
$this->Link($this->sanitiseClassName($this->modelClass)),
|
||||||
|
'?' . http_build_query($params)
|
||||||
|
);
|
||||||
|
|
||||||
return $items;
|
return $items;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user