I am looking to build a large SAAS site using MODX, I hope.
I have been reading all the information and tutorials about setting up contexts for multiple domains and setting up permissions to limit user access to see just 1 context.
Some accounts (users) will just have 1 contexts, but another account could have a main context and 5 or 6 sub-contexts and 5 or 6 users? The assumption is that none of the "accounts" are related, but sub-contexts would be related and could share elements (templates, chunks, etc), but not pages (resources).
My first question is will modx scale to support something like this?
I assume that I will have to create sub-directories for each context. I am not wild about duplicating index.php, .htaccess, etc for each context, but if I can keep assets (css,js,images) separate, plus uploaded files, this would make cleanup when an account is closed, much easier. Thoughts?
The one thing I have not done a lot of research on is - How to duplicate a portion of a website, 10-15 resources and related elements, and Duplicate (with one button) or export and import into a new context. I would use this to create a default environment when a new account is created. Is this possible? are there some addons that could do parts of this?
Has anyone done anything like this? Am I asking to much of MODX?
Please let me know any good reading material about any of these topics.
Thanks in advance for the help!
Bill
-
☆ A M B ☆
- 24,524 Posts
Yes, MODx Revolution will certainly scale to something like this - that's what it was expressly designed for.
http://rtfm.modx.com/revolution/2.x/administering-your-site/contexts
You don't have to create unique home pages, each context has its own Context Settings that override the System Settings, so you could specify the resource ID to be your home page for each Context, or leave it to default to the System Setting.
I think simply right-clicking on a context and duplicating it should also duplicate all resources in that context, or it may give you the option of doing so, I'm not really sure.
-
☆ A M B ☆
- 24,524 Posts
While poking around looking for more information, I found this page, which has some very interesting suggestions for using Context Settings
http://www.cmstricks.com/blog/2012/11/10/modx-context-settings/
-
☆ A M B ☆
- 24,524 Posts
Yes, the default global assets path and URL is set in the config.inc.php file, but this setting can be overridden in context settings, so each context can have its own site_start and modx_assets_path and modx_assets_url. You need both, since some supporting files need to be accessed internally by file path, while others are accessed by the browser via URL.
If you do need a gateway plugin, my preferred plugins is
this one which does not need any modification to the .htaccess or other rewrite methods.
This is where it is used (see the comments, scroll down a ways to gadamiak's comment) in the case of multiple languages using contexts, very similar to your usaage.
Great. I will start building out a test site to test out the things that we have talked about.
I am sure I will have more questions.
Thanks again.