restruct/silverstripe-gridfieldsitetreebuttons

This package is abandoned and no longer maintained. The author suggests using the Please add github issue if still using this module package instead.

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

Installs: 11

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 4

Forks: 0

Open Issues: 0

Type:silverstripe-vendormodule

pkg:composer/restruct/silverstripe-gridfieldsitetreebuttons

dev-master 2025-10-17 18:49 UTC

This package is auto-updated.

Last update: 2025-10-17 18:49:50 UTC


README

Not needed anymore, from Silverstripe 4/5 onwards regular Gridfield addnew button works fine

ARCHIVED (add issue to some Restruct module to let me know if you still need this module)

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:

Screenshot

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

Usage

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

Like this:

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

Requirements

SilverStripe 4.0 or higher

Pro tip

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