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

Forums / General Discussions / Multiple OpenAccess Providers

Multiple OpenAccess Providers

2 posts, 0 answered
  1. Andrew
    Andrew avatar
    15 posts
    Registered:
    28 Dec 2012
    06 Feb 2013
    Link to this post
    Hello,

    I'm looking at a unique implementation of multiple Sitefinity instances used for different pieces of content/designs.  Long story short, I would like to have a separate Sitefinity instance for maintaining the blogs, and have my other Sitefinity instance be able to access those blogs.  It could be done with RSS feeds, but I'd prefer the functionality that comes with using a different provider.  Now, since these will both be Sitefinity instances, I would like to reuse the OpenAccessProvider in visual studio.  I could slightly extend it so that it knows how to connect to the separate database via OpenAccess.  My questions are as follows:

    1.  Are there any known problems with this approach?
    2.  If it can be done, how can I extend/override the OpenAccessProvider used by the Blogs module to connect to the different sitefinity database?

    Thanks,
    Andy
  2. Stanislav Velikov
    Stanislav Velikov avatar
    1113 posts
    Registered:
    30 Nov 2016
    11 Feb 2013
    Link to this post
    Hi,

    1. There are no problems with this the provider class can be extended and substituted the same way the built in provider for dynamic modules is used.

    2. I have attached a video demonstrating how to add new providers for news, the approach is the same for all content types. The second news provider is pulling data from another sitefiniity database to sum up the steps from the video:

    1.Create a connection string (I have taken the default connection string from default provider and changed the DB name)

    2. Create new provider for news (I have copied the fields from the default provider and added a new name).

    3. Add applicationName parameter that will take the news form /News if the other database is Sitefinity

    4. Add another connectionString parameter with key:connectionString and Value: Name of the connection string from step 1.

    5. Restart the pplication to see if you get the new news provider in Content->News as shown in the video.

    When creating new provider for any content type you add it under the default provider which for news is OpenAccessNewsProvider, for blogs OpenAccessBlogsProvider and so on. To extend the class inherit from OpenAccessNewsProvider in a class your solution and when creating new provider in the Provider type textbox add the fully qualified name of your class. Override any of the logic for the built in providers.

    Regards,
    Stanislav Velikov
    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