A SilverStripe 4 module that manages a DataObject single record, much in the way of the core 'Settings' section.
Warning: The module is built using React, and this means it is work in progress. At this point not all SilverStripe components support React, including the GridField. So getCMSFields will generate an empty tab for has_many relations...
- SilverStripe 4.0
Using git
, clone the repo to a location of your choice:
git clone https://github.com/Martimiz/silverstripe-detailsadmin ./my-repo-name
In your module create a default DataObject customSettings
, than create an DetailsAdmin extension like this:
<?php
use Martimiz\DetailsAdmin\DetailsAdmin;
class CustomSettingsAdmin extends DetailsAdmin
{
private static $url_segment = 'customsettings';
private static $menu_title = 'Custom Settings';
private static $menu_icon_class = 'font-icon-cog';
private static $menu_priority = 9;
private static $tree_class = CustomSettings::class;
}
Using Node.js and Yarn, perform a yarn install
from the root of the module.
Read About this Module for more info on how this module works.
All issues can be reported here
https://github.com/Martimiz/silverstripe-detailsadmin/issues
Contribution is very welcome in the form of opinions, information, issuereports and pullrequests
Martine Bloem aka Martimiz - martine at balbus dot nl
BSD-3-Clause © Balbus Design
SilverStripe Module Starter Kit was used for the basic setup of this module.