To display a new widget in admin menu

Topics: General, Writing modules
Sep 5, 2011 at 8:58 AM

Hi Guys.

I am creating a blogroll widget... please it should appear in the admin menu like feeds...

I ceated one Adminmenu.cs page like this

namespace Blogroll {
    public class AdminMenu : INavigationProvider {
        public Localizer T { get; set; }

        public string MenuName { get { return "admin"; } }

        public void GetNavigation(NavigationBuilder builder) {
            builder.Add(T("Blogroll"), "5", BuildMenu);
        }

        private void BuildMenu(NavigationItemBuilder menu) {
                menu.Add(T("Manage Blog"), "10", item => item.Action("Index", "Admin", new {area = "Blogroll"}));
        }
    }
}

 

but its not coming in admin dashboard..please anyone suggest me..how to bring in admin menu

Thanks

selva

Sep 5, 2011 at 10:01 AM
I've found that if you build the module it will come through. It may be down to caching or similar.

Anytime something doesn't seem to work as expected I do a recycle of the app pool and things tend to kick in then.

Thanks

Steve



On 5 Sep 2011, at 08:58, "kselvakumarmca" <notifications@codeplex.com> wrote:

From: kselvakumarmca

Hi Guys.

I am creating a blogroll widget... please it should appear in the admin menu like feeds...

I ceated one Adminmenu.cs page like this

namespace Blogroll {
public class AdminMenu : INavigationProvider {
public Localizer T { get; set; }

public string MenuName { get { return "admin"; } }

public void GetNavigation(NavigationBuilder builder) {
builder.Add(T("Blogroll"), "5", BuildMenu);
}

private void BuildMenu(NavigationItemBuilder menu) {
menu.Add(T("Manage Blog"), "10", item => item.Action("Index", "Admin", new {area = "Blogroll"}));
}
}
}

but its not coming in admin dashboard..please anyone suggest me..how to bring in admin menu

Thanks

selva

Sep 5, 2011 at 11:55 AM

SteveTaylorUK,

Thank you its working...great...