Custom Configuration Items in Module

Posted by Community Admin on 03-Aug-2018 14:19

Custom Configuration Items in Module

All Replies

Posted by Community Admin on 11-May-2011 00:00

Hi All,

I am at the end of a SF4 development but due to some last minute changes i need to update my custom modules configuration to include a couple of extra strings but i cant seem figure out how?

I simply want to add a couple of string config items to this configuration below, can anyone point me in the right direction?

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Telerik.Sitefinity.Modules.GenericContent.Configuration;
using Telerik.Sitefinity.Configuration;
using BlocksModule.Data;
 
namespace BlocksModule.Config
    public class BlocksConfig : ContentModuleConfigBase
    
 
        public override string DefaultProvider
        
            get
            
                return "Linq2SqlDataProvider";
            
        
 
        protected override void InitializeDefaultProviders(Telerik.Sitefinity.Configuration.ConfigElementDictionary<string, Telerik.Sitefinity.Configuration.DataProviderSettings> providers)
        
            providers.Add(new DataProviderSettings(this.Providers)
            
                Name = "Linq2SqlDataProvider",
                Description = "A provider that stores blocks data in a database using Linq2Sql.",
                ProviderType = typeof(Linq2SqlDataProvider)
            );
        
 
        protected override void InitializeDefaultViews(Telerik.Sitefinity.Configuration.ConfigElementDictionary<string, Telerik.Sitefinity.Web.UI.ContentUI.Config.ContentViewControlElement> contentViewControls)
        
        
    

Posted by Community Admin on 12-May-2011 00:00

Can anyone help me with this, i am very stuck :(

Rob

Posted by Community Admin on 12-May-2011 00:00

Hello Roberto,

There is a help section that explains how to work with configurations and how to create custom configuration. Does the articles help?

Greetings,
Ivan Dimitrov
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 12-May-2011 00:00

Hi Ivan,

I did find that but coudnt figure out how it was related, i will take another loo. I dont want to create a new configuration section, i have one, it already exists in my module, but past the basic provider setting that is in there i dont know how i can add to it (i want to add a url key etc), if you look at my code that is the config code of my module, can i use code that is in the config section documentation you linked to in that? if so, is there any chance you could provide a simple example that is related to my code?

Thanks,

Rob

Posted by Community Admin on 13-May-2011 00:00

Thanks Ivan,

Woke up this morning took another look at the docs and found that was exactly what i needed.  Updated this thread to accept your response as the answer.

Thanks again,

Rob

This thread is closed