mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
Added ability to add extensions to LeftAndMain, and supply and augmentInit method on them
Added the ability to define getCMSTreeTitle in a LeftAndMain extension to change the main title at the top of the tree git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@40222 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
287f0990fc
commit
79f5bd5db4
@ -68,6 +68,9 @@ abstract class LeftAndMain extends Controller {
|
||||
Requirements::javascript('sapphire/javascript/Validator.js');
|
||||
|
||||
Requirements::css("sapphire/css/SubmittedFormReportField.css");
|
||||
|
||||
$dummy = null;
|
||||
$this->extend('augmentInit', $dummy);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -286,7 +289,12 @@ abstract class LeftAndMain extends Controller {
|
||||
|
||||
if(!$rootID) {
|
||||
$rootLink = $this->Link() . '0';
|
||||
$siteTree = "<ul id=\"sitetree\" class=\"tree unformatted\"><li id=\"record-0\" class=\"Root nodelete\"><a href=\"$rootLink\">Site Content</a>"
|
||||
|
||||
// This lets us override the tree title with an extension
|
||||
if($this->hasMethod('getCMSTreeTitle')) $treeTitle = $this->getCMSTreeTitle();
|
||||
else $treeTitle = "Site Content";
|
||||
|
||||
$siteTree = "<ul id=\"sitetree\" class=\"tree unformatted\"><li id=\"record-0\" class=\"Root nodelete\"><a href=\"$rootLink\">$treeTitle</a>"
|
||||
. $siteTree . "</li></ul>";
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user