micschk/silverstripe-gridfieldsitetreebuttons
最新稳定版本:2.0
Composer 安装命令:
composer require micschk/silverstripe-gridfieldsitetreebuttons
包简介
Modifies GridFields & GridField detail forms to use standard page edit form (with versioning, history & settings). Simple alternative for versionedgridfield.
README 文档
README
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:
统计信息
- 总下载量: 18.18k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 3
- 依赖项目数: 1
- 推荐数: 1
其他信息
- 授权协议: Unknown
- 更新时间: 2014-05-19