More in this section

Forums / Developing with Sitefinity / Since everything is stored in a database...

Since everything is stored in a database...

2 posts, 0 answered
  1. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    21 Feb 2009
    Link to this post
    Can I reference the same control data in two different pages?  Ive got two project sites (subdomains).  Each site has pages which need the same content.  Id like to be able to give the administrators the ability to just update the content in one spot...that at all do-able or a pipe dream? :)
  2. Dido
    Dido avatar
    149 posts
    Registered:
    24 Sep 2012
    23 Feb 2009
    Link to this post
    Hello Steve,

    Not everything in Sitefinity is stored in the database. Pages and content are, but not the controls physical files.

    A solution for the content sharing problem is to modify your connection string in web.config. Point all subdomains to the same database server and catalog.

    Sharing controls can be done via copy/paste (not recommended) or directory synchronization software (highly recommended).  The business logic of a program that copies a directory tree is very simple in .net (not optimized). Here are some of programs that could do it for you:
    • rsync (classic method) - a linux tool that is ported to Windows. Detailed instructions are given on the official site.
      • pros:
        • very good performance
        • free of charge
      • cons:
        • somewhat intimidating and awkward console interface.
        • depends on the way it was compiled, it may not support paths longer than 255 symbols or unicode symbols in the filepath.
    • rsync (windows GUI tool) - the same as above, with a far better user interface. Again, here are the detailed instructions on how to configure and use it
    • Allway Sync - a commercial product for backup and synchronization. (almost any backup tool will do, just make it "back up" to the directories you want to sync with). Here is the official web site.

    You can also use several providers with the same applicationName. Such content will be shared between the web sites. For example, if you define your News providers with the same applicationName, and your connection strings point to the same database, Sitefinity will "share" the News items between the both web sites. Changes done on one place, will reflect on the both sites.

    I hope this helps.

    Regards,
    Dido
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
2 posts, 0 answered