I have a multi site install with the Domain Access module. Each site has it's own menu and in most cases Menu Breadcrumb works as expected.

The problem comes when I have multiple links pointing to the same page. Site A and Site B both have menu's that point to the same about page. This causes problems with the query that finds the current menu.

   $menu_link = menu_link_load(db_result(db_query("SELECT mlid FROM {menu_links} WHERE link_path = '%s'", $menu_item['href'])));

The above query returns multiple results (3 or more) in my environment and it's the luck of the draw if I get the correct one.

The attached patch file is my solution. I only have one menu per site and Domain Access handles the variables so I can set "Default menu for content: " for each site and the patch uses that value to determine the current menu.

There may be other situations where this is useful so I thought I would submit a patch.

Comments

bwicksall’s picture

StatusFileSize
new2.98 KB

A glitch popped up in the above attached code so I'm attaching an improved version. The new version excludes the admin menu and fixes a glitch where titles were being set on pages that shouldn't have titles.

dboulet’s picture

Status: Active » Closed (duplicate)

Seems to be a duplicate of #364363: Select default custom menu.