Searched high and low for the answer to this, but it seems noone else is having it or really worries about it. Here's the issue:
- Class A has a getCMSFields() method that adds a tab called ‘Root.SEO’ with some fields in it.
- Class B inherits from Class A and has a getCMSFields() method of it's own that first calls $fields = parent::getCMSFields() and adds further fields/tabs to $fields.
- SEO tab is always before anything set in Class B, as Class A executes first. But I'd like it to be somewhere between two tabs defined by Class B
I tried $fields->removeByName('SEO') and they re-adding the tab in Class B manually. Which would be fine, but I can't seem to find a way to get hold of the SEO tab's content before removing it. So the best I can do is correctly position an empty SEO tab with no fields from Class A.