Table Sharing https://www.joshuafarry.com/ en Sharing Menu's across multisites https://www.joshuafarry.com/blog/2011/sharing-menus-across-multisites <span class="field field--name-title field--type-string field--label-hidden">Sharing Menu&#039;s across multisites</span> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/user/1" typeof="schema:Person" property="schema:name" datatype="">Josh</span></span> <span class="field field--name-created field--type-created field--label-hidden">Wed, 08/06/2011 - 10:06</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>We're deploying a multisite installation for our new Intranet at work. Essentially, we have a main intranet site (the default install), then we have a site for each department.</p> <p>The idea was to be that the primary links menu would stay the same across all sites. As there are 7 department sites, we didn't really want to copy and paste the menu 7 times, then edit it 7 times, whenever something changes in it. So, the best solution would be to share the appropriate menu table.</p> <p>I got to digging around in the database and it looked like 'menu_links' was the winner, so I shared it across all sites. The primary links menu now works fine across all sites (though you will need to clear your menu cache on all other sites when you update the primary links), but I have noticed a strange oddity. I went to one of my department sites to add the quicklinks menus, which are different for each site. I did them all from the one department because I assumed they would automatically be shared across all other department sites. They're not. They sit in a '[insert prefix here]_menu_custom' just on that one site... Strange.</p> <p>I'm now trying to figure out why this happened and if it is a function of multisite at all. If anyone has any answers for me, I'd be keen to hear them :)</p> <p>Edit (2016): Looking back at this, I recall that sharing the tables for menus was the completely wrong way to go about the problem. If I had my time again, I'd just write a module which would combine two menus into a single menu. The main menu would be the top level and another menu (unique on each department site)would appear below the primary. This would have taken care of the mlid (menu link ID) which was the problem when trying to share the original table.</p></div> <div class="field field--name-field-blog-tags field--type-entity-reference field--label-inline"> <div class="field__label">Tags</div> <div class="field__items"> <div class="field__item"><a href="/taxonomy/term/1" hreflang="en">Drupal 6</a></div> <div class="field__item"><a href="/taxonomy/term/11" hreflang="en">Multisite</a></div> <div class="field__item"><a href="/taxonomy/term/12" hreflang="en">Table Sharing</a></div> </div> </div> <section class="field field--name-field-blog-comments field--type-comment field--label-above comment-wrapper"> <h2 class="title comment-form__title">Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=6&amp;2=field_blog_comments&amp;3=comment" token="dpYbd2vVnCJCXcQ8O44h111--q6kOHp4vaZqvGM8kLU"></drupal-render-placeholder> </section> Wed, 08 Jun 2011 00:36:00 +0000 Josh 6 at https://www.joshuafarry.com