We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23525
    • 7 Posts
    Anybody with insight on sharing same content across multiple sites under one MODX installation?

    I'm trying to see if MODX would fit my need of white-label sites. All the sites have the same content but look and feel are different based on the domain name. Obviously, this means no duplicating of the document tree in the Resources manager (and no replication using symbolic links either). Main content would need to stay as resources, but if needed I could use different templates, chunks, or snippets to achieve the different designs. I'm willing to trade web design flexibility for ease of adding new domain.

    Basically: http://domainA.com/some-resource.html and http://domainB.net/some-resource.html should have the same core content (the resource), but would look different (i.e. logo, color scheme, different header or footer, eventually different layout).

    I don't mind too much writing a custom solution snippet but I don't want to go that route if it's a dead end.

    Any ideas?

    This question has been answered by pjausions. See the first response.

      • 22303 MODX Staff
      • 10,725 Posts
      One approach would be to put the shared Resources in one Context, then have each white label domain create SymLinks in a separate Context to the shared content. This allows each site to have the structure appropriate for that site, different Templates, etc.

      Another approach would be to set up one site as a shared content provider site which each white label site presents content from via a web service.
      • discuss.answer
        • 23525
        • 7 Posts
        I think what I would need is being able to abstract content from the context. Context would need to pull content from their own resources or, if none are found, from the abstracted resources. And then somehow use the proper template from the context using some naming convention based on the domain name (or context ID).

        Duplicating resource trees (or using symlinks) is just a maintenance nightmare. That might work with 2-10 sites with few pages, but after that, synchronizing content is a big hassle.

        So, if we can hook 404's and template loading that might be workable. However, I'm afraid that approach would forgo search capabilities.

        The whole concept behind white-label is really associating several templates to the same resource, then selecting the appropriate one based on context. A tall order for Revolution?