Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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).
Comment | File | Size | Author |
---|---|---|---|
menu_block.module.patch | 1.64 KB | aaron1234nz | |
menu_block.api_.php_.patch | 899 bytes | aaron1234nz | |
Comments
Comment #1
markwittens CreditAttribution: markwittens commentedI 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!
Comment #2
OnkelTem CreditAttribution: OnkelTem commentedAaron, thank you very much for this great patch. Thats what I was looking for!
Comment #3
zerolab CreditAttribution: zerolab commented+1
Works nicely in 2.4 as well. Would be great to have it merged into the module
Comment #4
JohnAlbin