Failed to add simple admin menu :-(

Topics: Administration, Writing modules
Jun 17, 2014 at 10:46 AM
Hi guys,

I'm very new to Orchard, so surely i've missed something ...
  • I've installed Orchard 1.8
  • Then created module "Orchard.Webshop" with the commandline codegen
  • In the module directory, created AdminMenu.cs with the content below
  • The module Webshop is enabled
  • Even added the Styles\menu.webshop-admin.css
Still, the menu Webshop doesn't show up ...
What i'm missing ?

Thanks a lot

my docs:
http://docs.orchardproject.net/Documentation/adding-admin-menu-items
http://skywalkersoftwaredevelopment.net/blog/writing-an-orchard-webshop-module-from-scratch-part-10


AdminMenu.cs :
using System.Web.Routing;
using Orchard.Environment;
using Orchard.Localization;
using Orchard.UI.Navigation;
using Orchard.Security;

namespace Orchard.Webshop
{
    public class AdminMenu : INavigationProvider
    {
        public string MenuName
        {
            get { return "admin"; }
        }

        public AdminMenu()
        {
            T = NullLocalizer.Instance;
        }

        private Localizer T { get; set; }

        public void GetNavigation(NavigationBuilder builder)
        {
            builder

                // Image set
                .AddImageSet("webshop")

                // "Webshop"
                .Add(item => item

                    .Caption(T("Webshop"))
                    .Position("2")
                    .Action("Index", "Admin", new { area = "Orchard.Webshop" })
                    .Permission(StandardPermissions.SiteOwner)
                );
        }
    }
}
Jun 17, 2014 at 4:31 PM
Ok solved...

Working with webmatrix, I just needed to ensure that all module files are included in the .csproj .... In this case AdminMenu.cs.