More in this section

Forums / Developing with Sitefinity / Adding new provider API

Adding new provider API

2 posts, 0 answered
  1. Denis
    Denis avatar
    105 posts
    Registered:
    27 Feb 2009
    25 Feb 2013
    Link to this post

    Hi,

    I'm trying to add new provider from code. That is what I have so far:

                var providers = Config.GetManager().GetSection<LibrariesConfig>().Providers;
                if (!providers.ContainsKey("ww4Images"))
                {
                    providers.Add(new DataProviderSettings(providers)
                        {Name = "ww4Images",
                        Title = "WW Images",
                        Description = "WW images hosted on Sitefinity 4",
                        ResourceClassId = typeof(LibrariesResources).Name,
                        ProviderType = typeof(Telerik.Sitefinity.Modules.Libraries.Data.OpenAccessLibrariesProvider),
                        Parameters = new NameValueCollection() { { "applicationName", "/Images" },
                                                                 { "connectionName", "Sitefinity4" },
                                                                 { "connectionString", "Sitefinity4" }}
                         
                        });
                }

    What do I need to add to my code in order to update sitefinity configuration files to remember new provider?

    Thanks, Denis.

  2. Stefani Tacheva
    Stefani Tacheva avatar
    718 posts
    Registered:
    31 May 2017
    27 Feb 2013
    Link to this post
    Hi,

    Please review the following forum post where you will find useful information.

    Greetings,
    Stefani Tacheva
    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
2 posts, 0 answered