Skip to content

Commit

Permalink
FIX: Get CMS preview working for non inline-editable elements. (silve…
Browse files Browse the repository at this point in the history
…rstripe#936)

Fixes silverstripe#905. Depends on silverstripe/silverstripe-admin#1250
This was a feature in an earlier version of the module and most of the code is still in place.
  • Loading branch information
GuySartorelli authored Jan 30, 2022
1 parent 7b35957 commit cfbc69a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Models/BaseElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
use SilverStripe\View\ArrayData;
use SilverStripe\View\Parsers\URLSegmentFilter;
use SilverStripe\View\Requirements;
use SilverStripe\ORM\CMSPreviewable;

/**
* Class BaseElement
Expand All @@ -47,7 +48,7 @@
*
* @mixin Versioned
*/
class BaseElement extends DataObject
class BaseElement extends DataObject implements CMSPreviewable
{
/**
* Override this on your custom elements to specify a CSS icon class
Expand Down Expand Up @@ -113,6 +114,10 @@ class BaseElement extends DataObject
*/
protected $controller;

private static $show_stage_link = true;

private static $show_live_link = true;

/**
* Cache various data to improve CMS load time
*
Expand Down

0 comments on commit cfbc69a

Please sign in to comment.