2017 © Pedro Peláez
 

silverstripe-module silverstripe-gridfieldsitetreebuttons

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

image

micschk/silverstripe-gridfieldsitetreebuttons

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

  • Tuesday, June 30, 2015
  • by micschk
  • Repository
  • 2 Watchers
  • 4 Stars
  • 8,262 Installations
  • PHP
  • 2 Dependents
  • 1 Suggesters
  • 2 Forks
  • 2 Open issues
  • 2 Versions
  • 3 % Grown

The README.md

Sitetree Buttons for GridField

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

Best used in combination with: * silverstripe-excludechildren module to hide pages from the sitetree, (*2)

Or use/subclass the preconfigured GridfieldPages module, which contains both the excludechildren module and this sitetreebuttons module: * silverstripe-gridfieldpages, (*3)

Screenshot

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

Usage

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

Like this:, (*6)

$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, (*7)

Pro tip

Use/subclass the prefabricated GridfieldPages module as a all-in-one base: * silverstripe-gridfieldpages, (*8)

The Versions

30/06 2015

dev-master

9999999-dev

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

  Sources   Download

The Requires

 

by Avatar micschk

silverstripe gridfield sitetree excludechildren

07/01 2015

1.0

1.0.0.0

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

  Sources   Download

The Requires

 

by Avatar micschk

silverstripe gridfield sitetree excludechildren