Breadcrumb/back nav in ModelAdmin now retains search params

This commit is contained in:
Ingo Schommer 2013-01-21 12:04:20 +01:00
parent 8717deca82
commit f7c8778466

View File

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