How to sync one menu item into other menus? I have a Drupal menu called Top-Nav which I use for my Top Navigation with the following 6 menu items(for example)

Home   a    b    c    d    e


Each of a, b, c, d and e have sub items.
I also have 5 other menus let's say named "menu1", "menu2", "menu3", "menu4", "menu5" that have exactly the same structure/items as a, b, c, d, e
Like "menu1" is the same as "a", "menu2" is the same as "b" ...

What I am trying to achieve is the following:
When the admin adds a new item to "a" section of Top-Nav i want to replicated that item in "menu1" programmatically, I want to sync them once the new link is added.
My suggestion is to use hook_form_FORM_ID_alter to add a custom submit handler. In that submit handler, you will get the current menu item values. Use those values to create a new menu item for the other menu.

Functions to use:


hook_form_FORM_ID_alter. Here form id will be 'menu_edit_item'
Use form['#submit'][] = "custom submit handler" in form alter.
Use menu_link_save in custom submit handler based on the values you get form the form_state.