Merge pull request #2141 from open-sausages/pulls/4.0/template-page-name

ENHANCEMENT Use i18n template for page tree title
This commit is contained in:
Robbie Averill 2018-04-11 10:21:32 +12:00 committed by GitHub
commit 69b2f90c6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -529,11 +529,13 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
'listViewLink' => $this->LinkListViewChildren($node->ID),
'rootTitle' => $rootTitle,
'extraClass' => $this->getTreeNodeClasses($node),
'Title' => sprintf(
'(%s: %s) %s',
trim(_t('SilverStripe\Admin\LeftAndMain.PAGETYPE', 'Page type'), ' :'),
$node->i18n_singular_name(),
$node->Title
'Title' => _t(
self::class . '.PAGETYPE_TITLE',
'(Page type: {type}) {title}',
[
'type' => $node->i18n_singular_name(),
'title' => $node->Title,
]
)
];
};