0

In a multisite installations where One site is as Master and has all the taxonomy terms defined. In second site i.e. Slave site, the content types are different but taxonomy terms are similar as of Master.

My quest is, how to get taxonomy terms from Master's database whenever taxonomy is called in Slave site, either be it content creation or Display.

The solution could be, db_set_active('Master') while any taxonomy term is called and change it to default db_set_active() after the taxonomy term is already displayed. But I am not sure where to place this.

Master has 4 taxonomy terms:

  1. Bang
  2. Dang
  3. Chang
  4. Nang

Slave has none, but while creating content in Slave there is a field type for Taxonomy reference, like:

Field Name: what is diyang? (Taxonomy terms reference with 4 options in the select list) which should get the taxonomy term from Master.

Any hints or ideas?

0

You may need to share tables across database. You can read this note on how to share tables across instances. Though its not a good solution of what you want.

You can also use Services module to achieve this.

  • Thanks for the hints about services module, I'll look into it. About Shared tables, the site I am working on is doing the same thing sharing the tables via settings.php file. However as it's not recommended I was trying to create custom module which can override the database call from taxonomy directly to Master site's database. – user12947 Jun 15 '15 at 11:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy