I’ve got a node, I want it’s menu. As far as I can tell, node_load doesn’t include it. Obviously, it’s trivial to write a query to find it based on the path node/nid, but is there a Drupal Way to do it?
I’ve got a node, I want it’s menu. As far as I can tell,
Share
The Menu Node module exposes an API to do this.
You can read the documentation (Doxygen) in the code. I think the functionality you need is provided by the
menu_node_get_links($nid, $router = FALSE)method:An associative array of
mlid => menu objectis returned. You probably only need the first one so it might look like something like this:Otherwise, you can try out the suggestion in a thread in the Drupal Forums:
Use
node/[nid]as the $path argument for: