API Add a missing alternatePreviewLink hook for SiteTree extensions.

This commit is contained in:
Mateusz Uzdowski 2013-05-17 14:57:17 +12:00
parent 2567cda0b4
commit bccd2f8e51

View File

@ -446,7 +446,11 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
* @return string
*/
public function PreviewLink($action = null) {
return $this->AbsoluteLink($action);
if($this->hasMethod('alternatePreviewLink')) {
return $this->alternatePreviewLink($action);
} else {
return $this->AbsoluteLink($action);
}
}
/**