public function getCMSFields() { $f = parent::getCMSFields(); //$f->removeByName("Content"); //$gridFieldConfig = GridFieldConfig_RecordEditor::create(); //$gridFieldConfig->addComponent(new GridFieldSortableRows('SortOrder')); /*$gridField = new GridField("StaffTeam", "Staff Teams", StaffTeam::get(), GridFieldConfig_RecordEditor::create()); $f->addFieldToTab("Root.Main", $gridField); // add the grid field to a tab in the CMS */ return $f; }
public function getCMSFields() { $fields = parent::getCMSFields(); $fields->makeFieldReadonly('Author'); $attachments = new SortableUploadField('Attachments'); //SortableUploadField class in in the "sortablefile" module $attachments->setFolderName('Uploads/BlogAttachments'); $attachments->setAllowedExtensions(array('pdf', 'doc', 'docx', 'csv', 'ppt', 'pptx', 'xls', 'xlsx', 'odt', 'ods')); $fields->addFieldToTab("Root.Main", $attachments, "Content"); return $fields; }
public function getCMSFields() { $fields = parent::getCMSFields(); $fields->addFieldsToTab('Root.Wordpress', array(new ReadonlyField('WordpressID', 'Wordpress Post ID'), new ReadonlyField('OriginalLink', 'Original Wordpress URL'), new ReadonlyField('OriginalData', 'Original Wordpress Data'))); return $fields; }