Admonish

Also, on the whole _resources folder topic, are there any known module conflicts with the _resources folder name change? I understand that its the new standard to avoid clashes with Page urls but what if I never intend on using http://mysite.com/resources as a page?

Admonish

In silverstripe 4 is there a template variable for the resources folder? I know there was a fairly recent change to the resource folder name (to _resources) so I think it would be useful to have a template variable for it

bumbus

you could iterate over $db fields in your extension and run a function like this on each field

bumbus
  1. public static function move_fields(
  2. FieldList $fields,
  3. string $fieldName,
  4. string $newTabName = 'Root.Main',
  5. string $insertBefore = null
  6. ): FieldList
  7. {
  8. $field = $fields->dataFieldByName($fieldName);
  9. $fields
  10. ->removeByName($fieldName)
  11. ->addFieldToTab($newTabName, $field, $insertBefore)
  12. ;
  13.  
  14. return $fields;
  15. }