I have written a module that adds some additional menu items to the Administration Menu. My method of doing this seemed to work up through 6.x-3.0-alpha1, but as of 6.x-3.0-alpha2 doesn't seem to work. I assumed that this was because of the newly-added hook_admin_menu_output_alter() interface, which seems like a good idea. However, in trying to implement this hook in my module, I realized that if one modifies $content['links'] in this hook, the modifications are not accessed anywhere else in the module:
[ghing@drupal admin_menu]$ grep -r "\['links'\]" *
admin_menu.api.php: * $content['links'] contains additional top-level links in the Administration
admin_menu.api.php: $content['links']['myitem'] = array(
admin_menu.api.php: $content['links']['myitem']['cron'] = array(
Also, doing a var_dump of $content in my implementation of the hook showed that the array contained no 'links' item when it is passed to the hook. I found that I was able to insert additional menu items by altering $content['menu'] but this seemed like a pretty messy way of adding the menu items that I wanted.
What is the roadmap for finishing the implementation for this hooks so it functions as documented in the comments?
"* $content['links'] contains additional top-level links in the Administration
* menu, such as the icon menu or the logout link. You can add more items here
* or play with the #weight attribute to customize them."
Best,
Geoff
Comments
Comment #1
sunTrue. The new contents are:
Comment #2
sunThanks for reporting, reviewing, and testing! Committed a fix to all branches.
A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.