MODx Revolution Multidomain/Contexts same content

453 Views Asked by At

I have a MODx website. It has 3 different contexts. Each context point to an other domain.

In one context (lets say it is C1), I have a resource (a folder) that has many child resources.

I display the resources with a pdoresources-call (frontend). Everything works fine. It lists/display the resources as it should be. When I click on it, it open as well and show me the content of the resources (The site ist something like a block)

But when I go to an other context (C2) and make the same pdoResources-Call it lists/display the resources as well. But when I click on the resource nothing happened. It do not open because it is another context.

How can I setup MODx Revolution to have different contexts that all can share content (Resources)

2

There are 2 best solutions below

0
On

It sounds like it may be pointing you to something like seconddomain.com/parent/child.html while it should be pointing to firstdomain.com/parent/child.html. If that's the case, you should make sure that each of your contexts has the site_url (and related http_host and base_url) context settings, so that MODX knows to send you to a different domain.

0
On

If you organize your resources in a tree with each domain as its own branch, you should setup a single "Start ID" for each context. That happens in the context settings (via main menu).

The full process is beeing described here: https://black-pixel.net/2014/02/24/multilingual-multidomain-site-modx-cms/

Maybe you have to call the PDO-Tools call uncached. Or to make sure, place the call into a chunk, duplicate it and place the context key into it (to have 3 different calls, one per domain). [[$subtree-call-C1]] for C1 etc...