开发者

Drupal content sync

开发者 https://www.devze.com 2023-02-06 10:37 出处:网络
I have 3 drupal sites. 2 of the drupal sites are public site (.com site), the third one is an internal site behind a firewall. The site behind the firewall runs in Linux and MySQL, but pull data from

I have 3 drupal sites. 2 of the drupal sites are public site (.com site), the third one is an internal site behind a firewall. The site behind the firewall runs in Linux and MySQL, but pull data from the office MS-SQL and create nodes from it. The questions is:

How can I update the other 2 drupal sites content from the office drupal site?

Note: I might not 开发者_JS百科need all the same fields in the public sites as in the internal one. I would like to have a setup that not only push the content to the two external sites, but if the internal site update a node, to have its content update in the external sites as well.

Thank you.


You could use the Feeds module on the external sites to poll the the office site for content and import new and updated content. Since you may not need all the fields on the external sites, Feeds will let you map the fields you want from the office site, to the fields you want stored on the external sites.

Depending on what data you needed to make available from the office site, you might need to customize the available feeds, using Views.


A tool rather than an out-of-the-box solution, but I have used CodeServer to sync settings and content from one site to another. Excerpt from the project page:

<?php
  // Set the node id of the node we are going to copy.
  $nid = 1234;
  // Instantiate CodeServer using the configuration named 'my_remote_site'.
  $remote = new CodeServer('my_remote_site');
  // Load a node from the remote site.
  $node = $remote->node_load($nid);
  // Save the node on the local site.
  node_save($node);
?>
0

精彩评论

暂无评论...
验证码 换一张
取 消