We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15738
    • 6 Posts
    I’ve looked through the forums and know you can run several sites from one modx install, but since I don’t have it installed I can’t tell if that means you can easily have access to use any component (ie. snippet or chuck) on any site. So if I have 3 websites that are all similar in purpose and I have a snippet that I want on all 3 sites... if I update that one snippet, then it updates on all 3 sites. This is what I can’t find my answer for.

    Also do the sites have to be sub-domains and is this something built in to the latest release or would I need to install a plug-in or add some code somewhere?

    Thanks.
      • 32699 ☆ A M B ☆
      • 427 Posts
      Simply stated: outside of using Revolution in Contexts what you propose would require external solutions, such as loading the snippet via a third party application, or another "snippet" / mysql call copying the updated snippet to the other databases.

      On the other hand you could always pull what ever changes and make it an include file and host it on one of the sites, with all of the snippets calling it.

      Just some ideas....
        Get your copy of MODX Revolution Building the Web Your Way http://www.sanitypress.com/books/modx-revolution-building-the-web-your-way.html

        Check out my MODX || xPDO resources here: http://www.shawnwilkerson.com
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        If the main snippet code is in an external .php file, and the snippet in the Manger only consists of a require or include statement, then it would work. Depending on your server configurations, you might be able to include or require the file across servers, or you might need to get fancy with cURL or some such functionality in order to access the "master" .php file.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org