Example #1
0
        private async Task ConfigureMainMenuAsync(MenuConfigurationContext context)
        {
            if (!MyProjectNameConsts.IsMultiTenancyEnabled)
            {
                ApplicationMenuItem administration = context.Menu.GetAdministration();
                administration.TryRemoveMenuItem(TenantManagementMenuNames.GroupName);
            }

            var l = context.ServiceProvider.GetRequiredService <IStringLocalizer <MyProjectNameResource> >();

            context.Menu.Items.Insert(0, new ApplicationMenuItem("MyProjectName.Home", l["Menu:Home"], "/"));
        }
        private async Task ConfigureMainMenuAsync(MenuConfigurationContext context)
        {
            if (!FirstABPConsts.IsMultiTenancyEnabled)
            {
                ApplicationMenuItem administration = context.Menu.GetAdministration();
                administration.TryRemoveMenuItem(TenantManagementMenuNames.GroupName);
            }

            var l = context.ServiceProvider.GetRequiredService <IStringLocalizer <FirstABPResource> >();

            context.Menu.Items.Insert(0, new ApplicationMenuItem("FirstABP.Home", l["Menu:Home"], "/"));
            context.Menu.AddItem(new ApplicationMenuItem("BooksStore", l["Menu:BookStore"])
                                 .AddItem(new ApplicationMenuItem("FirstABP.Books", l["Menu:Books"], url: "/Books"))
                                 );
        }