Permalink
Browse files

API Add a missing alternatePreviewLink hook for SiteTree extensions.

  • Loading branch information...
mateusz committed May 17, 2013
1 parent 2567cda commit bccd2f8e512c9cd9b7a9ee038aa00b0cd390abad
Showing with 5 additions and 1 deletion.
  1. +5 −1 code/model/SiteTree.php
View
@@ -446,7 +446,11 @@ public function AbsoluteLink($action = null) {
* @return string
*/
public function PreviewLink($action = null) {
- return $this->AbsoluteLink($action);
+ if($this->hasMethod('alternatePreviewLink')) {
+ return $this->alternatePreviewLink($action);
+ } else {
+ return $this->AbsoluteLink($action);
+ }
}
/**

0 comments on commit bccd2f8

Please sign in to comment.