mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
MINOR Implemented CMSMain->PreviewLink() (moved from LeftAndMain)
This commit is contained in:
parent
ae4dcc41e4
commit
d66a47271d
@ -126,6 +126,15 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function PreviewLink() {
|
||||
$record = $this->getRecord($this->currentPageID());
|
||||
$baseLink = ($record && $record instanceof Page) ? $record->Link('?stage=Stage') : Director::absoluteBaseURL();
|
||||
return $baseLink;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the entire site tree as a nested set of ULs
|
||||
*/
|
||||
|
@ -34,4 +34,8 @@ class CMSPagesController extends CMSMain {
|
||||
return parent::Link($action);
|
||||
}
|
||||
|
||||
function PreviewLink() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
@ -10,4 +10,8 @@ class CMSSettingsController extends CMSMain {
|
||||
return $this->RootForm();
|
||||
}
|
||||
|
||||
function PreviewLink() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user