Custom Configuration Section

Posted by Community Admin on 04-Aug-2018 22:29

Custom Configuration Section

All Replies

Posted by Community Admin on 24-Jan-2012 00:00

I'm trying to create a configuration section and I'm having some issues. If I use the code below, everything works correctly:

[ConfigurationProperty("SendPatientEmailNotifications", DefaultValue = true, IsRequired = true)]
public bool SendPatientEmailNotifications
    get return (bool)this["SendPatientEmailNotifications"];
    set this["SendPatientEmailNotifications"] = value;

When I change it to the following, I get the error below when viewing the item in the Settings section:

[ConfigurationProperty("SendPatientEmailNotifications", DefaultValue = true, IsRequired = true)]
[ObjectInfo(typeof(ConfigDescriptions), Title = "Send Patient Email Notifications", Description = "Set this value if you want to send emails when a patient registers (to the patient)")]
public bool SendPatientEmailNotifications
    get return (bool)this["SendPatientEmailNotifications"];
    set this["SendPatientEmailNotifications"] = value;

Could not find the specified key "Send Patient Email Notifications" or class id "ConfigDescriptions". 

I would like to have control on how the element is generated in the configuration section. The example above is just a boolean, but I also have a string field that I would like to have more than a single row textbox. Is this possible?

Also, I'm going to have multiple properties that I need to pull (from different configuration sections) and I would like to group all of my items in the settings area underneath the same parent header. How do I accomplish this?
ex:
Settings
-> Custom Area
->-> Area #1
->-> Area #2

Posted by Community Admin on 27-Jan-2012 00:00

Hi Miles,

Please make sure that the ConfigDescriptions file contains the all resource entries for the values you enter. Consider reviewing our documentation article regarding the creation of custom configuration classes:

www.sitefinity.com/.../deep-dive-configuration-creating-configuration-classes.html

You might also check the Product Catalog module in the SDK which has custom configuration class used.

Kind regards,
Victor Velev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 03-Sep-2014 00:00

is there a way to show it in the basic settings instead of the advanced ?

Posted by Community Admin on 05-Sep-2014 00:00

Hello Bishoy,

The Basic setting of custom widgets could be used by creation of Widget Designer for new or existing widgets.

This could be done by using Sitefinity Thunder.


Regards,
Svetoslav Manchev
Telerik

 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

Posted by Community Admin on 29-Oct-2015 00:00

Is there a way to create a configuration property that hooks to the image gallery?

This thread is closed