+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Custom Configuration Section

Custom Configuration Section

5 posts, 0 answered
  1. Miles
    Miles avatar
    32 posts
    Registered:
    23 Nov 2011
    24 Jan 2012
    Link to this post
    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
  2. Victor Velev
    Victor Velev avatar
    1345 posts
    Registered:
    06 Jul 2015
    27 Jan 2012
    Link to this post
    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:

    http://www.sitefinity.com/40/help/developers-guide/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
  3. Bishoy
    Bishoy avatar
    27 posts
    Registered:
    15 Aug 2013
    03 Sep 2014
    Link to this post

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

  4. Svetoslav Manchev
    Svetoslav Manchev avatar
    735 posts
    Registered:
    29 Sep 2016
    05 Sep 2014
    Link to this post
    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
     
  5. Jayson
    Jayson avatar
    3 posts
    Registered:
    23 Oct 2015
    29 Oct 2015
    Link to this post
    Is there a way to create a configuration property that hooks to the image gallery?
5 posts, 0 answered