You are here

function page_manager_menu_link_alter in Chaos Tool Suite (ctools) 7

Same name and namespace in other branches
  1. 6 page_manager/page_manager.module \page_manager_menu_link_alter()

Watch menu links during the menu rebuild, and re-parent things if we need to.

File

page_manager/page_manager.module, line 1134
The page manager module provides a UI and API to manage pages.

Code

function page_manager_menu_link_alter(&$item) {
  return;

  /** -- disabled, concept code --
    static $mlids = array();
    // Keep an array of mlids as links are saved that we can use later.
    if (isset($item['mlid'])) {
      $mlids[$item['path']] = $item['mlid'];
    }

    if (isset($item['parent_path'])) {
      if (isset($mlids[$item['parent_path']])) {
        $item['plid'] = $mlids[$item['parent_path']];
      }
      else {
        // Since we didn't already see an mlid, let's check the database for one.
        $mlid = db_query('SELECT mlid FROM {menu_links} WHERE router_path = :path', array('path' => $item['parent_path']))->fetchField();
        if ($mlid) {
          $item['plid'] = $mlid;
        }
      }
    }
   */
}