Open Closed

MVC public site: How to keep selected menu item #4634


User avatar
0
jfistelmann created

Hey :)

I have a public site set up with abp suite. That is MVC land and to my shame I am still a noob on that field.

This is my situation: We have a left side menu which is always opened. The menu contains items with other items in them. For example products/bounce houses. If I click on bounce houses, I get redirected to another site. on the new site, information about the currently opened menu is gone (I understand that this is the case because MVC is stateless).

Can you please guide me on how to make it so that the menu acts normal?

  1. I click on products to then click on bounce houses
  2. Navigation to target, menu looks like this

Would be a dream if menu looks like this after navigation

  • ABP Framework version: v7.0.2
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no

6 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    I will check this.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    What is the theme you are using?

    Did you add the below code to your index page?

    @{
        // replace the bloew localization keys with yours
        PageLayout.Content.Title = L["Applications"].Value;
        PageLayout.Content.BreadCrumb.Add(L["Menu:OpenIddict"].Value);
        PageLayout.Content.MenuItemName = OpenIddictProMenus.Applications;
    }
    
  • User Avatar
    0
    jfistelmann created

    hi

    What is the theme you are using?

    Did you add the below code to your index page?

    @{ 
        // replace the bloew localization keys with yours 
        PageLayout.Content.Title = L["Applications"].Value; 
        PageLayout.Content.BreadCrumb.Add(L["Menu:OpenIddict"].Value); 
        PageLayout.Content.MenuItemName = OpenIddictProMenus.Applications; 
    } 
    

    Hey maliming :)

    I am using lepton theme. App is still running with IdentityServer. Putting the code into index.cshtml leads to this: Does not know of PageLayout (I think it is supposed to be a property or something?)

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you share your public site project? liming.ma@volosoft.com?

  • User Avatar
    0
    jfistelmann created

    hi

    Can you share your public site project? liming.ma@volosoft.com?

    sure, I'll prepare everything for that.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    thanks

Made with ❤️ on ABP v9.1.0-preview. Updated on December 10, 2024, 06:38