mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
77212c0647
commit
8066376290
@ -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)
|
||||
)));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user