diff --git a/admin/code/LeftAndMain.php b/admin/code/LeftAndMain.php index e96b1c665..e789450cc 100644 --- a/admin/code/LeftAndMain.php +++ b/admin/code/LeftAndMain.php @@ -336,9 +336,8 @@ class LeftAndMain extends Controller implements PermissionProvider { } function handleRequest(SS_HTTPRequest $request, DataModel $model = null) { - $title = $this->Title(); - $response = parent::handleRequest($request, $model); + $title = $this->Title(); if(!$response->getHeader('X-Controller')) $response->addHeader('X-Controller', $this->class); if(!$response->getHeader('X-Title')) $response->addHeader('X-Title', $title); @@ -1342,8 +1341,10 @@ class LeftAndMain extends Controller implements PermissionProvider { * @return string */ function SectionTitle() { - if($title = $this->stat('menu_title')) return $title; - + $class = get_class($this); + $defaultTitle = LeftAndMain::menu_title_for_class($class); + if($title = _t("{$class}.MENUTITLE", $defaultTitle)) return $title; + foreach($this->MainMenu() as $menuItem) { if($menuItem->LinkingMode != 'link') return $menuItem->Title; }