Skip to content

Commit

Permalink
Localized CMS breadcrumbs title
Browse files Browse the repository at this point in the history
  • Loading branch information
chillu committed Jul 18, 2012
1 parent d75a061 commit abc87a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion code/controllers/CMSMain.php
Expand Up @@ -318,7 +318,8 @@ public function Breadcrumbs($unlinked = false) {

// The root element should point to the pages tree view,
// rather than the actual controller (which would just show an empty edit form)
$items[0]->Title = self::menu_title_for_class('CMSPagesController');
$defaultTitle = self::menu_title_for_class('CMSPagesController');
$items[0]->Title = _t("{$this->class}.MENUTITLE", $defaultTitle);
$items[0]->Link = singleton('CMSPagesController')->Link();

return $items;
Expand Down
3 changes: 2 additions & 1 deletion code/controllers/CMSSettingsController.php
Expand Up @@ -64,9 +64,10 @@ function LinkPreview() {
}

function Breadcrumbs($unlinked = false) {
$defaultTitle = self::menu_title_for_class(get_class($this));
return new ArrayList(array(
new ArrayData(array(
'Title' => $this->SectionTitle(),
'Title' => _t("{$this->class}.MENUTITLE", $defaultTitle),
'Link' => false
))
));
Expand Down

0 comments on commit abc87a4

Please sign in to comment.