ENHANCEMENT Use i18n template for page tree title

This commit is contained in:
Damian Mooyman 2018-04-10 10:30:49 +12:00
parent 0fcff60fb4
commit 87d69ba753
No known key found for this signature in database
GPG Key ID: 78B823A10DE27D1A

View File

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