Starts in:
0 DAY
20 HRS
9 MIN
46 SEC
Starts in:
0 D
20 H
9 M
46 S
Open Closed

Settings in Administration #2064


User avatar
0
viswajwalith created

**ABP Framework version: v4.4 UI type: MVC DB provider: EF Core / MongoDB Tiered (MVC) or Identity Server Separated (Angular): yes - Micro service Exception message and stack trace:

We want to remove tab 'Emailing' and change label for 'Lepton Theme' in Administration Settings.

We did not find any source code. Please guide us how to solve these.


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

    Hi,

    You can try:

    public class MySettingPageContributor : ISettingPageContributor
    {
        public async Task ConfigureAsync(SettingPageCreationContext context)
        {
    
            context.Groups.RemoveAll(x => x.Id == "Volo.Abp.EmailSetting");
    
            var leptonThemeSettingPageGroup = context.Groups.FirstOrDefault(x => x.Id == "Volo.Abp.LeptonThemeManagement");
    
            if (leptonThemeSettingPageGroup != null)
            {
                leptonThemeSettingPageGroup.ComponentType = typeof(MyLeptonThemeSettingGroupViewComponent);
            }
        }
    
        public Task<bool> CheckPermissionsAsync(SettingPageCreationContext context)
        {
            return Task.FromResult(true);
        }
    }
    
    Configure<SettingManagementPageOptions>(options =>
    {
        options.Contributors.Add(new MySettingPageContributor());
    });
    

    You can use ABP Suite to download the Lepton Theme source code.

    The setting document: https://docs.abp.io/en/abp/latest/Modules/Setting-Management#mvc-ui

  • User Avatar
    0
    viswajwalith created

    Thank you for your support.

    The solution working good. How to use localization in SettingPageContributor.

    we want to hide 'Public Website Style' control in Theme Tab and how to hide any control in any tab in settings.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    How to use localization in SettingPageContributor.

    Hi, you can try:

    var l = context.ServiceProvider.GetRequiredService<IStringLocalizer<YourResource>>();
    settingGroup.DisplayName = l["..."]
    

    we want to hide 'Public Website Style' control in Theme Tab and how to hide any control in any tab in settings.

    You can overwrite the theme setting page: https://docs.abp.io/en/abp/latest/UI/AspNetCore/Customization-User-Interface

    You can use the abp get-source Volo.LeptonTheme command to down LeptonTheme source code.

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