silverstripe-gridfield-betterbuttons icon indicating copy to clipboard operation
silverstripe-gridfield-betterbuttons copied to clipboard

Draft and Live preview links showing where they shouldn't be

Open sheadawson opened this issue 10 years ago • 3 comments

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?

sheadawson avatar Mar 27 '14 04:03 sheadawson

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

dhensby avatar Jun 24 '14 20:06 dhensby

Confirmed in latest ver using SS3.5.3 when implementing a Link() method

screen shot 2017-04-11 at 11 57 37 am

zanderwar avatar Apr 11 '17 01:04 zanderwar

Actually checking to see if the DataObject has the Versioned extension would probably be the best bet

sheadawson avatar Apr 11 '17 02:04 sheadawson