Quote from: apcherry at Oct 27, 2010, 11:36 AM
Thanks for that, very useful information - although I’m still struggling to visualize how it works, so please forgive the basic questions.
Presumably you set up the first site using the advanced installation method and move the core directory. So what happens when you set up a second site? Do you create a new directory, use the advanced installation but delete the core directory and during the setup point it to the same core directory referenced by the first installation?
Pretty much, yeah. I’ve not actually set up another manager and site yet but I have upgraded my existing sites and I assume it’ll largely be the same, without the core upgrade.
The core is obviously already there - so copy the setup directory from the installation package to a new site root - configure your web server and head off to yournewsite.com/setup. When asked, tell setup where the core directory is located and off you go. I assume the manager gets created during the setup process.
I might give this a go on my test kit just to see what happens as I am going on assumptions from the initial setup.
Quote from: apcherry at Oct 27, 2010, 11:36 AM
The bit I’m struggling to visualize is where the resources and elements are stored. When you have the two sites up and running how does the manager work? If I install a package, for example Wayfinder, is that part of the core and does that then get installed for all the sites linked to that one core directory? So then what about the resources and the files, I presume these are linked to each individual site with it’s own database. So what happens on the second site, does it get the resources and files from it’s local database but the elements are taken from the core? Is this where you’d use parameter sets to tailor snippet calls for the relevant website? Am I talking sense or am I completely wide of the mark?
Right - firstly, resources and elements are in the database. If you have two managers, I would assume you’ve set up two databases (remember to set a different config key for each site during set up - it’s a tiny link on the first page IIRC.) Therefore resources and elements are separate.
The recommendation from modx is that files such as PHP classes to support components go into the core/components directory (so are in the core) and front-end files to support these components (e.g. images/javascript etc) go in assets/components in the site (so are site-specific.)
Of course packages can also put things in the database - system settings, for example - so again these are site-specific.
I would hesitate a guess that you can install a package in one site, but it won’t be available in the other site (even though it’s in the core.) Judging by how modx works, I’d also guess that the package - once downloaded in one site - will be available to install in the other site without downloading it again.
Quote from: apcherry at Oct 27, 2010, 11:36 AM
Sorry for all the questions but I’m just trying figure out how it works.
No worries - I’m learning something new every day with modx! It’s a huge beast.