Download the PHP package micschk/silverstripe-gridfieldsitetreebuttons without Composer
On this page you can find all versions of the php package micschk/silverstripe-gridfieldsitetreebuttons. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download micschk/silverstripe-gridfieldsitetreebuttons
More information about micschk/silverstripe-gridfieldsitetreebuttons
Files in micschk/silverstripe-gridfieldsitetreebuttons
Package silverstripe-gridfieldsitetreebuttons
Short Description Modifies GridFields & GridField detail forms to use standard page edit form (with versioning, history & settings). Simple alternative for versionedgridfield.
License
Informations about the package silverstripe-gridfieldsitetreebuttons
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:
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 3.0 or higher
Pro tip
Use/subclass the prefabricated GridfieldPages module as a all-in-one base: