D7 - How to get mlid value from path of menu item Quick question. How to get mlid value from path of menu item. There is a function called menu_link_load() but it requires an mlid value, but I need something exacly the same function using path.
There's no build-in function for this. You can use menu_tree_all_data(), but it returns all the menu. After that you can compare in loops your path with the paths returend. But there is a better and easier answer. Here it is:

$mlid = array();
$q = 'your-path';
$menu_info = db_select('menu_links' , 'ml')
  -&gt;condition('ml.link_path' , $q)
  -&gt;fields('ml', array('mlid', 'plid'))
  -&gt;execute()
  -&gt;fetchAll();

foreach($menu_info as $key =&gt; $value) {
  $mlid[] = $menu_info[$key]-&gt;mlid;
}