Remove "File Tracking" and "Link Tracking" tabs from ModelAdmin


#1

Silverstripe Version: 4.2

Question:

How do I get rid of the File Tracking and Link Tracking tabs from modeladmin?

I’ve tried

public function getCMSFields()
{
    $fields = parent::getCMSFields();
    $fields->removeByName('Root.FileTracking');
    return $fields;
}

#2

Did you try $fields->removeByName(‘FileTracking’). I think you are using the syntax for removeFieldFromTab.


#5

As @DorsetDigital mentioned and after reading some of the related GitHub issues, for CWP 2.1.1 recipe we went with a custom DataObject extensions removing the fields.


#3

There’s a related issue to make it easier to customise this behavior. Link tracking adds extra tab to CMS edit form · Issue #2227 · silverstripe/silverstripe-cms · GitHub


#4

You can remove them both at once with:

$fields->removeByName(['FileTracking', 'LinkTracking']);


#6

Is there a Silverstripe 4 Version where Link Tracking and File Tracking do not show up automagically for all DataObjects?


#8

Thank you, that is great news.


#7

They seem to be gone in SS4.3 ModelAdmin