Base solution for your next web application
Open Closed

Web.Public FrontEndNavigationProvider url order issues #8716


User avatar
0
crumbdav created

Greetings; FYI: I tried to use your search functionality but kept returning 500 error.

I am working in the Web.Public project and trying to establish my links within the FrontEndNavigationProvider.cs file

For the life of me I can't figure out what is going on. The order of the links as displayed on the website isn't the same as the order ot he MenuItemDefinitions

For example, in the code the order is (1)Home, (2)About, (3) Multiline example

but when it's run it's listed as About - Home - Multiline example

What's attributing to the order of these links?

Any guidance is appreciated,

--Dave

Here is the order on the website navigation bar

[Contact us]  [How]  About  Home  Products and Services

Here is the code:

frontEndMenu

            //HOME
            .AddItem(new MenuItemDefinition(
                FrontEndPageNames.Home,
                L("HomePage"),
                url: ""
                )

            //ABOUT
            ).AddItem(new MenuItemDefinition(
                FrontEndPageNames.About,
                L("AboutUs"),
                url: "About"
                )
            ).AddItem(new MenuItemDefinition(
                FrontEndPageNames.About,
                L("Products"),
                url: "Products"
                )
              ).AddItem(new MenuItemDefinition(
                FrontEndPageNames.Products,
                L("How"),
                url: "How"
                )
               ).AddItem(new MenuItemDefinition(
                FrontEndPageNames.How,
                L("ContactUs"),
                url: "ContactUs"
                )
            );
            
            

1 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    FYI: I tried to use your search functionality but kept returning 500 error.

    You can view the details of the error in the application's log.

    or example, in the code the order is (1)Home, (2)About, (3) Multiline example but when it's run it's listed as About - Home - Multiline example What's attributing to the order of these links?

    see https://github.com/aspnetzero/aspnet-zero-core/pull/2996 https://github.com/aspnetzero/aspnet-zero-core/commit/79625dbc260fddfaaac05fcd36a5396c29373f79