Hi, I am trying to create a ModelAdmin section that edits One Object instead of having a table of Objects .
If we look at the Settings Section/ModelAdmin then that is exactly what I want, When I click the Settings tab I get the textFields to edit the site Title & Tagline .
How can I do that ? been looking at the SiteConfig.php & CMSSettingsController.php for some time but didnt 100% get it all ..
Love to get some help & work out a solution that we can publish too :D
The easiest way of getting similar functionality I think would be to create the ModelAdmin with the DataObject.
Ensure the permissions of the DataObject make canCreate and canDelete return false.
Add a requireDefaultRecords function to ensure one record is always created on a dev/build (if it doesn't already exist).
The only downside is that you need to search for and then click the record to then edit it - however I know there is a small js hack to get records to auto load... it would take much to extend that to open the record into an edit form each time.
Not ideal GUI, but functionality - hope this helps.