Open Closed

Example for number/checkbox/select Setings definition #3652


User avatar
0
cleverplatform created

Hi trying to dig out from abp documentation and samples the usage number / checkbox / select setings but Im not really sure how the settings provider should looks like and also I don't want to use module from EasyAbp.

Could you pls. navigate myselft to right and full example (not documentation - I think that parts are missing on docs.abp.io ) where I can see definition number / checkbox / select setings with correct UI rendering ?

THanks Erik

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

2 Answer(s)
  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    Setting Management doesn't provide any UI component automatically like feature management. You should implement it yourself. If you store data in database, you should write a Custom Setting Value Provider and AppServices for it.

    Rendering your custom component in UI

    You should define your view like email settings here: https://github.com/abpframework/abp/blob/dev/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Pages/SettingManagement/Components/EmailSettingGroup/Default.cshtml

    And Create a SettingPage Contributo that inherits from SettingPageContributorBase

    https://github.com/abpframework/abp/blob/b515f89b9f465b462c81e62a2b1bbd2093d96b75/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Settings/EmailingPageContributor.cs#L21-L25

    • Configure your contributor in SettingManagementPageOptions
    Configure<SettingManagementPageOptions>(options =>
    {
        options.Contributors.Add(new YourSettingPageContributor());
    });
    

    That's it, your component will be visible on UI

  • User Avatar
    0
    cleverplatform created

    Thanks enisn

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