Modifies GridFields & GridField detail forms to use standard page edit form (with versioning, history & settings).
- See
composer.jsonrequirements
composer require wedevelopnl/silverstripe-gridfieldsitetreebuttons
After installation, run a dev/build with flush to complete the installation
In GridFieldConfig, replace GridFieldAddNewButton('toolbar-header-right') with GridFieldAddNewSiteTreeItemButton('toolbar-header-right') and new GridFieldDetailForm() with GridFieldEditSiteTreeItemButton()
Example
$gridFieldConfig = GridFieldConfig_RecordEditor::create();
$gridFieldConfig->removeComponentsByType(GridFieldAddNewButton::class);
$gridFieldConfig->addComponent(new GridFieldAddNewSiteTreeItemButton('toolbar-header-right'));
$gridFieldConfig->removeComponentsByType(GridFieldAddNewButton::class);
$gridFieldConfig->addComponent(new GridFieldEditSiteTreeItemButton());See License
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
See read our contributing document for more information.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. See read our contributing document for more information.