I am looking for a way to use drupal_render() to show the entire expanded main menu. Right now I am using this piece of code, but since I use the Menu blocks module from the third level on, all links from level 3 (and down) are missing here. Solution must be working with i18n, too.

if (module_exists('i18n_menu')) {
  $main_menu_tree = i18n_menu_translated_tree(variable_get('menu_main_links_source', 'main-menu'));
else {
  $main_menu_tree = menu_tree(variable_get('menu_main_links_source', 'main-menu'));
print drupal_render($main_menu_tree);

Any idea on how I can get all links shown?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.