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:
Sean Harvey 2013-05-16 20:18:49 -07:00
commit 180defd2ca

View File

@ -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);
}
} }
/** /**