The menu.get method of the Menu service uses the Menus module's menu_tree_page_data function. This function returns a menu as it should be displayed in the current page. Some sub-items may be hidden, for example. As the notion of a "current page" is not relevant to a Web service call, I propose that this method uses the menu_tree_all_data function instead, which returns the complete menu tree, regardless of the current page. I believe this would be a more natural behaviour for this method.
It's a one-line change to the menu.inc file. Patch is attached. Sorry if the format if not good, I'm not very familiar with submitting patches.
| Comment | File | Size | Author |
|---|---|---|---|
| full_menu.patch | 95 bytes | qbert72 |
Comments
Comment #1
marcingy commentedPlease roll a valid patch so as we can discuss this further
Comment #2
marcingy commentedAfter review of what is happening yes this does make sense as we never have a page context as such. Patch committed.
Comment #3
marcingy commented