Skip to content

This SilverStripe module adds regular sitetree-edit buttons for pages managed in a Gridfield (simple alternative for versionedgridfield)

License

Notifications You must be signed in to change notification settings

wedevelopnl/silverstripe-gridfieldsitetreebuttons

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sitetree Buttons for GridField

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

Requirements

  • See composer.json requirements

Installation

composer require wedevelopnl/silverstripe-gridfieldsitetreebuttons

After installation, run a dev/build with flush to complete the installation

Usage

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());

License

See License

Maintainers

Development and contribution

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.

Development and contribution

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.

About

This SilverStripe module adds regular sitetree-edit buttons for pages managed in a Gridfield (simple alternative for versionedgridfield)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%