We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • I'm using the domain x.com(context x) with a number of data. And in near future my friend wants to create other domain y.com (context y), which will use the same data on x. I wonder is there any method to use the data of context x on context y which can point links from domain x.com to domain y.com?
    I'm thinking of working a simple seperate loading resource on y.com which will pull the data based on getResources?&context=`x`, use the id to load necessary content. But that should be the last solution if I can't find other way.
    The context switch is based on MODX_HTTP_HOST and context settings: http_host,site_url,etc.
    • I think once working with multi-context with custom template sharing the same data, this should be an issue. I think I'll do the last shot with seperate loading resource with snippet to resolve the uri or id to pull the data.
      • Still hoping for someone to discuss about this issue.
        • If the sites are the same, why do you need multiple contexts? Just point both domains at the same content and make sure the site_url or any absolute links are not cached into the pages.
          • Hi opengeek,
            It's so good that I can get a reply from you. The data between two context is partly the same, based on 2 different campaigns. To save time posting again some news or blog post, I think pulling the data from previous context is better. Duplicate content is not good, but at this context, it's good for SEO other campaign, on the same server.