ENHANCEMENT: LeftAndMain breadcrumbs to use MenuTitle

Breadcrumbs in the CMS currently only use title, when MenuTitle is
probably more appropriate (if it is set).
This commit is contained in:
Loz Calver 2012-12-13 14:25:56 +00:00 committed by Ingo Schommer
parent 77212c0647
commit 8066376290

View File

@ -645,13 +645,13 @@ class LeftAndMain extends Controller implements PermissionProvider {
$ancestors->push($record);
foreach($ancestors as $ancestor) {
$items->push(new ArrayData(array(
'Title' => $ancestor->Title,
'Title' => ($ancestor->MenuTitle) ? $ancestor->MenuTitle : $ancestor->Title,
'Link' => ($unlinked) ? false : Controller::join_links($this->Link('show'), $ancestor->ID)
)));
}
} else {
$items->push(new ArrayData(array(
'Title' => $record->Title,
'Title' => ($record->MenuTitle) ? $record->MenuTitle : $record->Title,
'Link' => ($unlinked) ? false : Controller::join_links($this->Link('show'), $record->ID)
)));
}