Activities of "LumeteDev1"

Hi,

I need to add ItemMenu and SubItemMenu dynamically through AppService.

The main menu documentsMenu appears only collapsed and all the main menus (e.g., SaaS, Administration, etc.) are only collapsed and cannot be expanded.

The generated HTML seems correct, however, the SubItemMenus exist.

How can I resolve this?

Thanks

This is code:

    // Documenti - albero con classi documentali come foglie
    var documentsMenu = new ApplicationMenuItem(
        Suite4SolutionsMenus.Documents,
        l["Menu:Documents"],
        icon: "fa fa-paperclip");

    try
    {
        if (await context.IsGrantedAsync(Suite4SolutionsPermissions.Documents.Default))
        {
            var documentMenuState = context.ServiceProvider.GetRequiredService<DocumentMenuState>();
            await documentMenuState.EnsureLoadedAsync();

            foreach (var dc in documentMenuState.DocumentClasses)
            {
                documentsMenu.AddItem(new ApplicationMenuItem(
                    Suite4SolutionsMenus.Documents + "." + dc.Id.ToString("N"),
                    dc.Name,
                    url: $"/documents/{dc.Id}",
                    icon: "fa fa-file-alt",
                    requiredPermissionName: Suite4SolutionsPermissions.Documents.Default));
            }
        }
    }
    catch
    {
        // Se la chiamata API fallisce, mostra solo il menù padre
    }

    context.Menu.AddItem(documentsMenu);
Showing 1 to 1 of 1 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 28, 2026, 11:44
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.