silverstripe-gridfield-betterbuttons
silverstripe-gridfield-betterbuttons copied to clipboard
Draft and Live preview links showing where they shouldn't be
From what I can see, if a DataObject has a Link() method, draft and live preview links are shown in the grid field form actions. This shouldn't be applied to some classes ie. File and subclasses of. And some of my DOs have Link methods that are external links.
Perhaps defining an exclude_classes config would be a good solution?
Maybe better to check they are a SiteTree
object? though understand you could have links to a DataObject
that was versioned and could be viewed directly at it's Link
Confirmed in latest ver using SS3.5.3 when implementing a Link()
method
Actually checking to see if the DataObject has the Versioned extension would probably be the best bet