Hi all,
I am currently working on a gallery plugin for grav and I am wondering whether anybody could help with suggesting a clean strategy of extending the admin plugin to accomplish the following:
- Custom ‘edit page’ view for a certain page type
- Drag and drop sorting of page media inside the new ‘edit page’ view
I have two general questions:
-
My approach until now was to add a page blueprint to define a custom admin page form that opens when editing the pages of the specific page type in the
pages
section. But the page blueprint form limits my options a little. I.e. how would I add custom js files to realize my drag and drop media sorting?
Of course I could add a complete different section to the admin menu (e.g. /admin/gallery) to get full control over the html/css/js surrounding the form but I would really like to integrate my plugin into the existingpages
section. What would be my best option here? Adding custom form fields to include the required javascript? Does not sound like the right place. -
My next question is about custom admin tasks (i.e. per sisting the media order). As far as I understand, the admin plugin instantiates an admin controller that implements certain tasks. Is there any place to register plugin tasks? Or is the only way right now to implement another Plugin Controller that does the routing to plugin specific tasks?