Starts in:
1 DAY
3 HRS
12 MIN
52 SEC
Starts in:
1 D
3 H
12 M
52 S
Open Closed

show Menu only on host side by options value - Blazor UI #3456


User avatar
0
ElifKaya created

Hello,

We have two questions about MenuContributor. Firstly, we always want to use MultiTenancySides.Both in permission side. But sometimes, we want to use just show our own module in host, not a tenant. We can create options class and then check it when if CurrentTenant.Id is null to achieve this. But we think that, it is not a best way for this. Can you give an advice about that?

And the above example is taken from our own module, but I want to use this logic also in Volo.CmsKit MenuContributor. How should I override it in CmsKit MenuContributor.

Thanks

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.

If you're creating a bug/problem report, please include followings:

ABP Framework version: v5.3.2

UI type: / MVC /

DB provider: EF Core

Tiered (MVC) or Identity Server Separated (Angular): yes / no

Exception message and stack trace:

Steps to reproduce the issue:"


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

    And the above example is taken from our own module, but I want to use this logic also in Volo.CmsKit MenuContributor. How should I override it in CmsKit MenuContributor.

    hi

    You can remove the CmsKit MenuContributor from the AbpNavigationOptions and copy the code to your MenuContributor

    Configure<AbpNavigationOptions>(options =>
    {
        options.MenuContributors.Remove...
    });
    
  • User Avatar
    0
    ElifKaya created

    And the above example is taken from our own module, but I want to use this logic also in Volo.CmsKit MenuContributor. How should I override it in CmsKit MenuContributor.

    hi

    You can remove the CmsKit MenuContributor from the AbpNavigationOptions and copy the code to your MenuContributor

    Configure<AbpNavigationOptions>(options => 
    { 
        options.MenuContributors.Remove... 
    }); 
    

    Thanks for your advice but I don't want to manage with options. I need to override CmsKitAdminMenuContributor.cs on some special case. Is there any way to do this?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    CmsKitAdminMenuContributor is not designed to be overridden. This is not possible at the moment.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06