Created: 2014-05-19 07:08
Updated: 2015-11-27 01:55

Sitetree Buttons for GridField

Modifies GridFields & GridField detail forms to use standard page edit form (with versioning, history & settings).

Best used in combination with:

Or use/subclass the preconfigured GridfieldPages module, which contains both the excludechildren module and this sitetreebuttons module:


Manage (add & edit) SiteTree items from a GridField:


In GridFieldConfig, replace GridFieldAddNewButton('toolbar-header-right') with GridFieldAddNewSiteTreeItemButton('toolbar-header-right') and new GridFieldDetailForm() with GridFieldEditSiteTreeItemButton()

Like this:

$gfconf = GridFieldConfig_RecordEditor::create();
$gfconf->addComponent(new GridFieldAddNewSiteTreeItemButton('toolbar-header-right'));
$gfconf->addComponent(new GridFieldEditSiteTreeItemButton());


SilverStripe 3.0 or higher

Pro tip

Use/subclass the prefabricated GridfieldPages module as a all-in-one base:

Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more