AdminParts Extension
I think given my glacial pace of development that dumping my branch and going with extensions is the way to go. Herewith, my first radiant extension.
I’ve had a bit of a play with giving extensions access to the admin pages. I’ve gone with the concept of having ‘AdminPart’ classes. A page class has an admin_parts array, listing the admin part classes, ie.
Page.admin_parts = [TitleAdminPart, ExtendedMetadataAdminPart, PartTabAdminPart]
These are rendered through corresponding partials under an admin_parts directory (ie, TitleAdminPart becomes admin_parts/_title.rhtml). The page controller then passes off to each of the admin parts to save their data back to the model.
I’ve got an extension that implements this (in a very rough way), and an proof of concept example.
http://soxbox.no-ip.org/radiant/svn/extensions/
The only noticable change from having the extension installed is that at the moment when you save a page, the parts are saved off regardless of whether the save of the entire page is successful. Doesn’t bother me at the moment though.