mirror of
https://github.com/silverstripe/silverstripe-dms
synced 2024-10-22 12:05:56 +00:00
Fix breadcrumbs for add document
This commit is contained in:
parent
adf25185f1
commit
66dd7e9394
@ -107,27 +107,27 @@ class DMSDocumentAddController extends LeftAndMain {
|
|||||||
/**
|
/**
|
||||||
* @return ArrayList
|
* @return ArrayList
|
||||||
*/
|
*/
|
||||||
/*public function Breadcrumbs($unlinked = false) {
|
public function Breadcrumbs($unlinked = false) {
|
||||||
$items = parent::Breadcrumbs($unlinked);
|
$items = parent::Breadcrumbs($unlinked);
|
||||||
|
|
||||||
// The root element should explicitly point to the root node.
|
// The root element should explicitly point to the root node.
|
||||||
$items[0]->Link = Controller::join_links(singleton('AssetAdmin')->Link('show'), 0);
|
$items[0]->Link = Controller::join_links(singleton('CMSPageEditController')->Link('show'), 0);
|
||||||
|
|
||||||
// Enforce linkage of hierarchy to AssetAdmin
|
// Enforce linkage of hierarchy to AssetAdmin
|
||||||
foreach($items as $item) {
|
foreach($items as $item) {
|
||||||
$baselink = $this->Link('show');
|
$baselink = $this->Link('show');
|
||||||
if(strpos($item->Link, $baselink) !== false) {
|
if(strpos($item->Link, $baselink) !== false) {
|
||||||
$item->Link = str_replace($baselink, singleton('AssetAdmin')->Link('show'), $item->Link);
|
$item->Link = str_replace($baselink, singleton('CMSPageEditController')->Link('show'), $item->Link);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$items->push(new ArrayData(array(
|
$items->push(new ArrayData(array(
|
||||||
'Title' => _t('AssetAdmin.Upload', 'Upload'),
|
'Title' => 'Add Document',
|
||||||
'Link' => $this->Link()
|
'Link' => $this->Link()
|
||||||
)));
|
)));
|
||||||
|
|
||||||
return $items;
|
return $items;
|
||||||
}*/
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user