Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Nested AppMenuItem #4398


User avatar
0
zokho created

Hi, How many nested level we can have within an AppMenuItem? I have got a side menu and trying to have 2 nested sub-menus but seems not more than one nested sub-menu is supported. Right?

new AppMenuItem('Administration', '', 'flaticon-interface-8', '', [
                new AppMenuItem('Jobs', 'Pages.Administration.Jobs', 'fa fa-tachometer', '', [
                    new AppMenuItem('JobLocations', 'Pages.Administration.Jobs.Locations', 'fa fa-map-marker', '/app/admin/job-locations'),
                    new AppMenuItem('JobClassifications', 'Pages.Administration.Jobs.Classifications', 'fa fa-object-group', '/app/admin/job-classifications'),
                ]), 
                new AppMenuItem('OrganizationUnits', 'Pages.Administration.OrganizationUnits', 'flaticon-map', '/app/admin/organization-units'),
            ])

7 Answer(s)
  • User Avatar
    0
    alper created
    Support Team

    I've added some sub menu items to the Metronic theme. It seems to be supporting many sub levels.

  • User Avatar
    0
    zokho created

    <cite>alper: </cite> I've added some sub menu items to the Metronic theme. It seems to be supporting many sub levels.

    Hey alper, Would you please share the code you have used to generate the nested menu items? I can't see any specific issue in my own code that shared earlier!

    Cheers,

  • User Avatar
    0
    alper created
    Support Team

    hi,

    I did it on the Chrome Developer Console. You can add nested menu items as stated below <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/Navigation">https://aspnetboilerplate.com/Pages/Doc ... Navigation</a>

    Try and share your results!

  • User Avatar
    0
    zokho created

    Hey Apler, Perhaps my bad explanation. I am trying to load nested menu items in Angular solution. The code sample you have shared however was for MVC. Here is my Angular manu structure:

    getMenu(): AppMenu {
            return new AppMenu('MainMenu', 'MainMenu', [
                new AppMenuItem('Dashboard', 'Pages.Administration.Host.Dashboard', 'flaticon-line-graph', '/app/admin/hostDashboard'),
                new AppMenuItem('Administration', '', 'flaticon-interface-8', '', [
                    new AppMenuItem('Jobs', 'Pages.Administration.Jobs', 'fa fa-tachometer', '', [
                        new AppMenuItem('JobLocations', 'Pages.Administration.Jobs.Locations', 'fa fa-map-marker', '/app/admin/job-locations'),
                        new AppMenuItem('JobClassifications', 'Pages.Administration.Jobs.Classifications', 'fa fa-object-group', '/app/admin/job-classifications'),
                    ]),
                    new AppMenuItem('OrganizationUnits', 'Pages.Administration.OrganizationUnits', 'flaticon-map', '/app/admin/organization-units'),
                ])
            ]);
        }
    

    The JobLocation and JobClassification appear under the Job menu item but without indention and the Job menu item does not collapse like its own parent (Administration) menu item.

  • User Avatar
    0
    zokho created

    Hi Alper, After spending some time over the issue I have finally found out that the issue is in the side-bar-menu.component.html file. I made some changes and have got it worked. The Accordion menu item works fine now but if in the "Visual Settings" page the Submenu toggle mode changes to Dropdown from Accordion, there wont be any pop up for the nested submenu item. How can I report the issue and my half way solution to your team to have it fully fixed?

  • User Avatar
    0
    alper created
    Support Team

    hi,

    Thanks for your feedback! You can create an issue => <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/issues/new">https://github.com/aspnetzero/aspnet-ze ... issues/new</a>

  • User Avatar
    0
    aaron created
    Support Team