Hello,
I'm attempting to alter which widgets are displayed in the Available Widgets section of the CMS. I've set up two fields in the CMS, with a has_one relation for each WidgetAreaEditor.
public function getCMSFields() {
$f = parent::getCMSFields();
$f->addFieldToTab('Root.Content.WidgetsFacebook', new WidgetAreaEditor('Facebook'));
$f->addFieldToTab('Root.Content.WidgetsTwitter', new WidgetAreaEditor('Twitter'));
return $f;
}
In the CMS however, both widgets are available under the Available Widgets section on both tabs. I know that I'll need to extend or overwrite the AvailableWidgets method, but I'm not quite sure how. I can see that the method currently loops through everything as an array and then spits them out to the CMS, and I'd like to be able to assign a widget to a Widget field tab.
Any suggestions greatly appreciated, thanks!