A code is worth a thousand words

Get node menu item (mlid) by node id (nid) in Drupal 7

You are here

There are many functions for menus, but since Drupal is not hierarchical but is modular, that's why menu doesn't have node requirement and the opposite way around. So this snippet shows how to get node menu item (mlid) by node id (nid) in Drupal 7. The fastest way to do it is to run a simple query.