Skip to content

Instantly share code, notes, and snippets.

@a-fro
Forked from iefrati/gist:15c2a17b7c4571c77645dfb55f3a58a2
Last active March 9, 2017 20:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save a-fro/7e450e903e0538e31317e71e32a739f0 to your computer and use it in GitHub Desktop.
Save a-fro/7e450e903e0538e31317e71e32a739f0 to your computer and use it in GitHub Desktop.
/**
* 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>';
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment