mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 06:05:56 +00:00
parent
7c4e6f4b60
commit
abc5556520
@ -409,11 +409,11 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
|||||||
public function Breadcrumbs($unlinked = false) {
|
public function Breadcrumbs($unlinked = false) {
|
||||||
$items = parent::Breadcrumbs($unlinked);
|
$items = parent::Breadcrumbs($unlinked);
|
||||||
|
|
||||||
// The root element should point to the pages tree view,
|
if($items->count() > 1) {
|
||||||
// rather than the actual controller (which would just show an empty edit form)
|
// Specific to the SiteTree admin section, we never show the cms section and current
|
||||||
$defaultTitle = self::menu_title_for_class('CMSPagesController');
|
// page in the same breadcrumbs block.
|
||||||
$items[0]->Title = _t("{$this->class}.MENUTITLE", $defaultTitle);
|
$items->shift();
|
||||||
$items[0]->Link = singleton('CMSPagesController')->Link();
|
}
|
||||||
|
|
||||||
return $items;
|
return $items;
|
||||||
}
|
}
|
||||||
|
@ -11,10 +11,4 @@ class CMSPageEditController extends CMSMain {
|
|||||||
private static $required_permission_codes = 'CMS_ACCESS_CMSMain';
|
private static $required_permission_codes = 'CMS_ACCESS_CMSMain';
|
||||||
private static $session_namespace = 'CMSMain';
|
private static $session_namespace = 'CMSMain';
|
||||||
|
|
||||||
public function Breadcrumbs($unlinked = false) {
|
|
||||||
$crumbs = parent::Breadcrumbs($unlinked);
|
|
||||||
$crumbs[0]->Title = _t('CMSPagesController.MENUTITLE');
|
|
||||||
return $crumbs;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4,19 +4,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<div class="cms-content-header-nav">
|
<div class="cms-content-header-nav">
|
||||||
<div class="breadcrumbs-wrapper" data-pjax-fragment="Breadcrumbs">
|
<% include CMSBreadcrumbs %>
|
||||||
<h2 id="page-title-heading">
|
|
||||||
<% loop $Breadcrumbs %>
|
|
||||||
<% if $First %>
|
|
||||||
<% else_if $Last %>
|
|
||||||
<span class="cms-panel-link crumb last">$Title.XML</span>
|
|
||||||
<% else %>
|
|
||||||
<a class="cms-panel-link crumb" href="$Link">$Title.XML</a>
|
|
||||||
<span class="sep">/</span>
|
|
||||||
<% end_if %>
|
|
||||||
<% end_loop %>
|
|
||||||
</h2>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="cms-content-header-tabs">
|
<div class="cms-content-header-tabs">
|
||||||
<ul class="cms-tabset-nav-primary">
|
<ul class="cms-tabset-nav-primary">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user