This patch adds a hook into this module which will allow a developer to modify the active path, and thus, the part of the menu which gets rendered.

This is useful to add navigation to nodes that do not have any (eg nodes linked to from a view).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

markwittens’s picture

I just succesfully used your patch to set the active path, thanks for sharing!

I did make a small adjustment because I needed to know what menu was rendered when the hook is called, this can be done easily by passing the config object when invoking it:

$override = module_invoke_all('menu_block_active_alter', $config);

I have several use cases for this hook so I hope this patch will be committed soon!

OnkelTem’s picture

Aaron, thank you very much for this great patch. Thats what I was looking for!

zerolab’s picture

+1
Works nicely in 2.4 as well. Would be great to have it merged into the module

JohnAlbin’s picture

Issue summary: View changes
Status: Needs review » Closed (won't fix)