cofoundry
cofoundry copied to clipboard
Customizable admin navigation
Currently the only way to customize the admin menu is to use roles and permissions to restrict access to the features you want to hide. You are not able to hide features from the super administrator role.
This issue does not cover globally disabling features (e.g. Pages, Directories), that is covered by #159.
This issue covers the ability to customize the grouping and organization of the admin navigation.
At the moment we only have two groups of links - Content and Settings, and all custom entities list out in the Content group which can be a problem if you have many custom entities. We cannot predict how you might want to organise all these links, so we should allow developers to customize the menu, choosing which links go in which groups, allowing custom groupings and possibly item separators.
This is likely to be done as part of a wider range of tasks to work on the UX of the admin panel, but could be done in isolation as the navigation menu is quite separate from the content panel.
(Extracted from issue #69)
Issue #343 and #332 both reference grouping of items in the admin menu. A way to customize the groupings of those items into sub-menus would be useful.
#356 references customizing the grouping of the admin panel.
In order to cover use-cases of simple and complex sites it's going to be necessary to heavily customize this menu. Any examples of how you'd like to organize the menu structures would be appreciated here.
I think that I'd like to see the admin menus automatically created based on classes implementing an interface such as the one below. This would mean that they work in a similar way to other parts of the system (custom entities for example).
public interface IAdminModuleMenuCategory {
/// <summary>
/// Unique 6 letter code representing the menu (use uppercase)
/// </summary>
string MenuCode { get; }
/// <summary>
/// Title of the menu
/// </summary>
string Title { get; }
/// <summary>
/// CSS Class for the icon
/// </summary>
string IconCssClass{ get; }
/// <summary>
/// The order in which the menu appears within the admin area
/// </summary>
int Order { get; }
}
I haven't worked out yet though how custom entities and admin modules could then be assigned to a particular menu, but I'm working on it.
For me, being able to do this is some way is a game changer, as I can then create an area for ecommerce, or event bookings etc. depending on the type of customer that I'm working with.
So, I've done some work on this and it's all checked into the purplepiranha/cofoundry
fork. I think I have the basis of a working solution, and have moved the 'Products' module in the BasicTestSite to a separate 'Shop' menu.
Please let me know what you think.
I'd like to be able to move custom entities to a different menu next. Hopefully I won't get too lost in the cycle of generics within generics within...
Added another update to our fork, now with the ability to move custom entities to different menus, and the ability to hide items from the menu all together.
Any feedback welcomed.