mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Merge pull request #745 from mateusz/alternate-preview-link
API Add a missing hook so we can override the SiteTree preview link.
This commit is contained in:
commit
180defd2ca
@ -446,7 +446,11 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
|||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function PreviewLink($action = null) {
|
public function PreviewLink($action = null) {
|
||||||
return $this->AbsoluteLink($action);
|
if($this->hasMethod('alternatePreviewLink')) {
|
||||||
|
return $this->alternatePreviewLink($action);
|
||||||
|
} else {
|
||||||
|
return $this->AbsoluteLink($action);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user