Skip to content

Instantly share code, notes, and snippets.

View a-fro's full-sized avatar

Aaron Froehlich a-fro

  • Cornell University
  • Ithaca, NY
View GitHub Profile
/**
* Implements hook_form_alter().
*/
function mymodule_form_alter(&$form, &$form_state, $form_id) {
if ($form_id == 'submenu_reorder_node_page_reorder') {
foreach (element_children($form['menu_items']) as $id) {
$menu_link = menu_link_load($id);
$url = url($menu_link["link_path"]);
$form['menu_items'][$id]['link_title']['#markup'] = '<a href="'. $url .'">'. $menu_link["link_title"] . '</a>';
}