Admin settings menu

Topics: Customizing Orchard, Writing modules, Writing themes
Sep 8, 2011 at 5:52 PM


Been looking around to try and figure these two out, but nothing seems to hit the nail...

I'm looking to be able to 

a) Add a new menu item under the settings menu in the admin section

- like search, looked in the module...must be missing something!

b) Add a new field to the general settings page

- looking in the messaging module, can see the view, but cant see how its added to the settings page!?


Thx again for your help!


Sep 8, 2011 at 5:57 PM

You can look at the Vandelay Industries module for an example of adding a menu entry in settings. In order to add your part to settings, you need to add it to the "Site" content type. The example I cited does that as well.

Sep 9, 2011 at 12:31 PM

Yep - that did it thanks.

For anyone else looking...

Add menu item under settings ...

public void GetNavigation(NavigationBuilder builder)

            // Add menu item in the settings menu
                menu => menu.Add(T("Menu Item Text"), "1", item => item.Action("Index", "Admin", new { area = "Your.Area" })

And to add a new section in the general need this in the handler for the part

Filters.Add(new ActivatingFilter<Models.SurveyWidgetPart>("Site"));

seemed to do the business for me!