function fp_render_menu_block

6.x fp_render_menu_block($title = "Tools", $menu_root = "tools", $bool_reset = FALSE)
4.x fp_render_menu_block($title = "Tools", $menu_root = "tools")
5.x fp_render_menu_block($title = "Tools", $menu_root = "tools")

Render a "menu" block of menu items which are all rooted at the menu_root. So if the menu root is tools, it might return items whose paths look like: tools/fun tools/here/there So long as the menu type is "MENU_TYPE_NORMAL_ITEM" or "MENU_TYPE_DEFAULT_TAB". Other types will be ignored.

We want to

3 calls to fp_render_menu_block()
admin_display_main in modules/admin/admin.module
This is the "main" page for the admin module. It's what the user first sees when the click to go to the Admin page.
admin_display_tools_screen in modules/admin/admin.module
This page displays all the tools that the user has access to use.
stats_display_main in modules/stats/stats.module
Main menu screen for this module.


includes/, line 557


function fp_render_menu_block($title = "Tools", $menu_root = "tools", $bool_reset = FALSE) {
  $rtn = "";

  $is_empty = true;
  if ($title != "") {
    $rtn .= fp_render_section_title($title);

  $menu_items = menu_get_items_beginning_with($menu_root);

  foreach ($menu_items as $item) {
    if ($item ['path'] === $menu_root) {
      continue; // don't need to duplicate the menu root link itself

    if ($item ["type"] == MENU_TYPE_NORMAL_ITEM || $item ['type'] == MENU_TYPE_DEFAULT_TAB) {
      $item = menu_get_item($item ['path'], $bool_reset);

      $rtn .= fp_render_menu_item($item);
      $is_empty = false;


  if ($is_empty) {
    return "";

  return $rtn;