The following shows only TopItem:
public class AdminMenu : INavigationProvider
{
public Localizer T { get; set; }
public string MenuName { get { return "admin"; } }
public void GetNavigation(NavigationBuilder builder)
{
builder.Add(T("TopItem"), "1.5", BuildMenu);
}
private void BuildMenu(NavigationItemBuilder menu)
{
menu.Action("LogOn", "Account", new { area = "Orchard.Users" });
menu.Add(T("SubItem"), "1",
item => item.Action("AccessDenied", "Account", new { area = "Orchard.Users" }));
}
}
(Orchard.Users used for demonstration only.)
This works, however with menu.LinkToFirstChild(false); I think this shouldn't be needed to be set explicitly.
This issue could be related:
http://orchard.codeplex.com/workitem/18771