4

I'm working on the Drupal 8 multisite where there is main site and partner sites.

For example partners publish events or news.

I want some content from partner sites to be available on the main site. How can this be done?

What I discovered so far:

  1. sharing db tables seems tricky - there are just to many node tables and their dependencies will likely break.

  2. I could create custom entity but then its not place in "content" (beacause it's not node type) and I will lose nice content handling. but tables are easier to share then.

  3. I could copy the content but then i have copies not the same content (what are possibilities here?)

5
  • Drupal 8 has a REST API for nodes built in, consuming that would probably be easiest if you can't share the DB tables
    – Clive
    Jan 8, 2016 at 12:03
  • 1
    I think you should detail a bit more about what do you mean by "sharing the content"; I suggest giving an example for such a case and detail about the frequency, etc... Because if it's something small - Manual sharing with an HTML canonical to emphasis the main site could be enough - It's too theoretical to know what nature of data-sharing you are interested in.
    – user16289
    Jan 8, 2016 at 12:05
  • Manual sharing is not possible as the partners wont likely have access to main site and it also should be convenient and automatic.
    – greg606
    Jan 8, 2016 at 12:07
  • The non "program it yourself" way would be to use Domain Access, which unfortunately doesn't have a Drupal 8 release yet
    – Clive
    Jan 8, 2016 at 12:23
  • Provide content from one site via a JSON API for example and then let the other sites fetch the output.
    – leymannx
    May 29, 2018 at 7:04

2 Answers 2

1

There are quite a few solutions available in Drupal contrib which allows sites to share the content with each other:

  • Workspace In core now creates multiple versions of the site.
  • Entity Pilot is a really good use core serializer solution. It tracks changes allow and merging via UI. If you want to track the content then you can also use Entity Pilot Git .
  • CPS D7 version only.
  • Domain access if your site shares the domain name then this is the best solution to display the same content on different domains.
  • Default Content you have to manually import export the content.
  • D8 to D8 migration is the last ditch solution there is no D8 to D8 migration in Drupal core at this moment but you can export content in CSV using CSV Serialization and then import it via Migrate Source CSV. The sites can periodically import or export data in hook_cron.
0

You can use Domain module in Drupal 8 for content sharing .I am not sure about Acquia lift or Acquia Hub , you can check with this option too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.