We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 51020
    • 670 Posts
    Hi there,

    I have been asked to create small, cost-effective web sites for members of a trade organisation.
    The sites will be pretty similar to each other, with the option of slightly different templates/colour schemes, typefaces etc.
    There could be 100 or so sites.

    Would it make sense to have them all in the same context, so that it's within a single Modx install, or does that have limitations on what we can do?

    I haven't really worked with contexts so not sure if that's a good use for them or not?

    Anyone produced anything similar?

    Just don't want to be upgrading/maintaining 100+ sites individually!


    Thanks
    Andy
      • 5430
      • 247 Posts
      Use multiple contexts. Separate contexts are still part of a single MODX instance, and the content for all of your contexts is stored in the same DB table, they simply have a different context_key setting. That's a lot of sites, but there's no reason you can't do this using contexts and doing so gives you complete control of the settings related to each specific site (site_url, site_name, etc.). Using a context routing plugin like XRounting makes it pretty simple.
        • 17301
        • 932 Posts
        Multiple context would be suited for this. I've done a few sites similar and the only times you may run into troubles is if you're sharing resources and possibly users between the two contexts. Everything else is pretty straight forward smiley
          ■ email: [email protected] | ■ website: https://alienbuild.uk

          The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.
          • 51020
          • 670 Posts
          Quote from: claytonk at Jul 17, 2017, 04:42 PM
          Use multiple contexts. Separate contexts are still part of a single MODX instance, and the content for all of your contexts is stored in the same DB table, they simply have a different context_key setting. That's a lot of sites, but there's no reason you can't do this using contexts and doing so gives you complete control of the settings related to each specific site (site_url, site_name, etc.). Using a context routing plugin like XRounting makes it pretty simple.

          OK thanks for confirming - I will have a look at those suggested plugins
            • 51020
            • 670 Posts
            Quote from: lkfranklin at Jul 18, 2017, 08:12 AM
            Multiple context would be suited for this. I've done a few sites similar and the only times you may run into troubles is if you're sharing resources and possibly users between the two contexts. Everything else is pretty straight forward smiley

            OK cheers - Contexts are an unknown entity to me - I need to do some reading before embark on this one!
              • 3749
              • 24,544 Posts
              I agree that multiple contexts are probably the way to go for your use case, but expect some headaches when implementing them. They are somewhat tricky, imo, and when things don't work, it's difficult to find out why. wink
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting
                • 51020
                • 670 Posts
                Quote from: BobRay at Jul 18, 2017, 10:02 PM
                I agree that multiple contexts are probably the way to go for your use case, but expect some headaches when implementing them. They are somewhat tricky, imo, and when things don't work, it's difficult to find out why. wink

                Thanks Bob. I spoke to a developer last night who suggested that the Manager could get very slow if there are a lot of contexts in there? He did say it's possible to have individual Modx instances for each site, but controlled by a single Modx installation, so that it's easier to manage/update. Is this possible?
                  • 17301
                  • 932 Posts
                  The biggest multi context site I have is around 40 domains and it's not slow. Only if you have loads of resource folders expanded so it has to go and load them all. You can also just create folders in one context and point your document root for the different domains to each folder.
                    ■ email: [email protected] | ■ website: https://alienbuild.uk

                    The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.
                    • 3749
                    • 24,544 Posts
                    My multi-site installs use a separate MODX db for each site, but none are over 6 or 7 sites and I don't share anything between the sites.

                    He did say it's possible to have individual MODX instances for each site, but controlled by a single MODX installation, so that it's easier to manage/update. Is this possible?

                    TBH, I've never tried this. I assume they would all share a single MODX core, but I would think with your setup you'd have collisions with aliases if you don't separate them by context. Without contexts, every alias would have to be unique.

                      Did I help you? Buy me a beer
                      Get my Book: MODX:The Official Guide
                      MODX info for everyone: http://bobsguides.com/modx.html
                      My MODX Extras
                      Bob's Guides is now hosted at A2 MODX Hosting
                      • 51020
                      • 670 Posts
                      OK - sounds dangerous to me! lol