Reputation: 2233
Is it possible to have a Model Admin type setup, where there is a tab on the left menu e.g Staff Members
, and on the right instead of just displaying a grid and managing a model, I want to have fields that sit above the grid and be able to save data to them...
Essentially working exactly the same as how you would do it on a page, but instead in its own tab on the sidebar etc?
Picture of what I am trying to achieve (Photoshopped)
Is this possible?
Upvotes: 3
Views: 403
Reputation: 5875
Yes you can. You'll have to create your own subclass of LeftAndMain
and implement your Form by overriding getEditForm
.
Say you named your new LeftAndMain
subclass StaffAdmin
, then you can add it to the CMS menu by adding this to your _config.php
file:
CMSMenu::add_menu_item('StaffAdmin', 'Staff Admin', 'staffadmin', 'StaffAdmin');
Upvotes: 2