I'm trying to display a custom menu item for a custom ASPX page in the CMS. I would like this to appear:
under Community, Moderation Mode
under Community, Admin Mode
so that it is available to editors.
So far I'm able to display it under CMS, Admin Mode, which is only available to administrators. This is possible through the GuiPlugin.
I tried (shooting in the dark) these things: implementing a community IModule and return a custom ascx control, a standard IModule returning a custom AdministrationNode, decorating my Page with a EPiServer.Shell.Navigation.MenuItem pointing to my custom page, implementing a custom MenuProvider.
I got no results.
At some point I even got an error message that I should be referencing System.ComponentModel.Composition version 2009... ?
With all these plumbing classes I see in ILSpy (MenuAssembler, MenuProvider and the whole family of them) you would expect that this shouldn't be that difficult. Does anyone know how to make this happen?
Look at the "Extending the Navigation" section of this document for information on how you would add custom items to the menu.
Per GunsarfsEPiServer Development Team
Thanks, that's what I needed! I had to register my module in the shell section of the config file and then annotate my page with the MenuItem and MenuSection attributes and that does the trick.
I saw through ILSpy that if use /global/Community/Admin or /global/Community/Moderate as the path, it will end up in the same section.
However I'm thinking maybe create my own top level section, because the community links render in an iframe through EPiServerCommunity/Admin.aspx which then doesn't happen with my page and that creates some UI inconsistency.
Thanks for the help!