The title may seem cryptic but it's best what came to my mind.
The case:
- There is a "template" context, which contains a big set of resources. Those resources are to be maintained and modified only by admins in this very context.
- There are many "working" contexts, each under a separate domain, which contain only few resources themselves, but are to display all resources from the "template" context. The resources served by every "working" context must be the same, when it comes to `content` and `uri` of each resource.
This can normally be achieved with symlinks, but:
- symlinks need to be created and maintained in every "working" context; there will be some 200 of them :/
- owners of the "working" context should not be able to edit the symlinked resources (except "customized" ones).
- Every "working" context will contain a small number of resources, which are present also in the "template" context, which will be customized by context owner/admin (like contact info etc.). However, the URIs will remain the same.
Those resources should replace ones from "template" context with the same URI.
- There may be custom resources in any "working" context, which are not present in the "template" context, but which should be merged into the menu.
Now, I think of a solution working like this:
- Wayfinder fetches menu from both contexts -- template and working -- based on current URI and displays. There's always a `start_id` resource in every "working" context.
- Upon requesting a resource a custom plugin searches for an URI and if not found in the "working" context, redirects to "template" context. In result the requested resource is served with `modx->sendRedirect` from the "template" context while it seems to sit in the "working" context. But it's not there, or it is and has been customized.
Is this logic ok? Or is there a simpler way to do this? Any suggestions are welcome.
This is the web: the only thing you know about who will come is that you don't know who will come.