Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

API Add a missing alternatePreviewLink hook for SiteTree extensions.

  • Loading branch information...
commit bccd2f8e512c9cd9b7a9ee038aa00b0cd390abad 1 parent 2567cda
@mateusz mateusz authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 code/model/SiteTree.php
View
6 code/model/SiteTree.php
@@ -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);
+ }
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.