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

Forums / Developing with Sitefinity / Share custom module content items between several instances

Share custom module content items between several instances

6 posts, 0 answered
  1. Denis
    Denis avatar
    105 posts
    Registered:
    27 Feb 2009
    01 Feb 2013
    Link to this post
    Hi. For example, I have custom module built with Module Builder or manually (like Products from SDK). Custom module has several content items. Is this possible to store data for this module in the separate database and share it between several Siteinfity instances? This is maybe useful if you have multi-divisional environment. Each division is running on separate instance and some data has to be consolidated in one place.
  2. Boyan Barnev
    Boyan Barnev avatar
    1429 posts
    Registered:
    28 Aug 2017
    05 Feb 2013
    Link to this post
    Hi Denis,

    Thnak you for using our services.

    Sitefinity is based on a provider architecture, this way allowing you to develop custom providers and retrieve the data from any desired data source. For the current use case scenario you can either have a central Sitefinity database where your sites will be pulling its data from, or develop a new database and provider that would fetch the data and return it to the system. For more information on the providers concept in Sitefinity I believe you might find the following blog post and documentation article useful.

    Regards,
    Boyan Barnev
    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. Denis
    Denis avatar
    105 posts
    Registered:
    27 Feb 2009
    06 Feb 2013 in reply to Boyan Barnev
    Link to this post
    Hi Boyan,

    Thank you for the reply!
    Provided examples show how to setup different providers to access different database. This is clear to me. I can add second connection string in data configuration file. I can add second providers for content modules. I'm not clear how to access content items using first content provider and copy them to other database using second content provider. Lets consider for simplicity Images content module. Can you provide some example (I don't need real working code), just an Idea how to do it from code.

    Thank you!
    Denis.
  4. Jen Peleva
    Jen Peleva avatar
    568 posts
    Registered:
    10 Nov 2016
    08 Feb 2013
    Link to this post
    Hi Denis,

    To get items from particular provider you simply have to pass the providerName to the GetManager() method. This way you will operate with imtes from that provider only.

    Kind regards,
    Jen Peleva
    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
  5. Denis
    Denis avatar
    105 posts
    Registered:
    27 Feb 2009
    24 Feb 2013 in reply to Jen Peleva
    Link to this post
    I did a small test using Sitefinity 5.4. Both websites are running on dev. web

    server from VS2012. I prepared small video for problem demonstration: http://webbywell.com/actions.swf.html. Problem description below:

    I created two websites. A and B.
    Uploaded test image in the first website (A).
    For the second website (B) I added new connection string to point to another
    database to pull out images. Also I created new provider (ww4Images) for
    Libraries (I used this post as a guide).

    For new provider (ww4Images) I specified two parameters:
    connectionString (pointing to new connection string)
    applicationName=/Libraries

    After application restart, I was able to see two providers available to select
    for images and other content items. If I switch to the second provider I can
    see the test image but it is broken (see broken_image.png). It is broken in
    Album and Details views.

    If I go to the details view and check Link value I see:
    Site A: http://localhost:12350/test/images/default-source/default-album/test.jpg?Status=Temp&sfvrsn=2 (valid)
    Site B: http://localhost:60876/images/default-source/default-album/test.jpg?Status=Temp&sfvrsn=2 (broken)

    Next step: On site B using ww4Images provider I upload another image (pic.png).
    And it shows up just fine on site B in Album and Detail views (see second_image_siteB).
    Link values for this image:
    Site A:
         - Thumbnail in album: http://localhost:12350/test/images/ww4Images/default-album/pic.png.tmb?Status=Master&sfvrsn=2 (valid)
         - Image in Details view: http://localhost:12350/test/images/ww4Images/default-album/pic.png?Status=Temp&sfvrsn=2
    (broken).
    Site B: http://localhost:60876/images/ww4Images/default-album/pic.png?Status=Temp&sfvrsn=2
    (valid)

    Please let me know what I’m missing here. It has to be something about
    provider URL name. I have seen another parameter name for Libraries provider
    called urlName, I tried to add it, but it doesn't change anything.

    Also I can delete image upload in site A from site B using second provider.

    One more observation, I can add new image using second provider and this

    image becomes available in the in the website.


    Thank you,
    Denis.
  6. Jen Peleva
    Jen Peleva avatar
    568 posts
    Registered:
    10 Nov 2016
    27 Feb 2013
    Link to this post
    Hello Denis,

    Actualy, it turns out that having multiple providers for media libraries is not possible at the moment. The reason comes from the fact that metadata for images is stored in the database, so if you pull images from an external database, your project won't have access to the metadata. We have logged a bug on the problem and will do our best to fix it as soon as possible. Please follow the PITS link to track its status:

    http://www.telerik.com/support/pits.aspx#/public/sitefinity/14396

    As a workaround you can setup a DropBox provider, which will allow you to store image in dropbox and your project will be able to pull those images from the same source. You can read more about this option here:

    http://www.sitefinity.com/documentation/gettingstarted/using-the-sitefinity-dropbox-synchronization-module

    Greetings,
    Jen Peleva
    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
6 posts, 0 answered