function example_helper_menu

7.x example_helper.module example_helper_menu()
6.x example_helper.module example_helper_menu()
4.x example_helper.module example_helper_menu()
5.x example_helper.module example_helper_menu()

Implementation of hook_menu

This is a powerful function in FlightPath. We use it to define which "menu" items ie, URLs, are valid in FlightPath, and what permissions are required to visit those URLs.

After creating new menu items in thos function, you MUST clear the menu cache (link in the Admin Console of FlightPath). Otherwise, FP will not be aware of your new URLs.

Documentation: http://getflightpath.com/api/flightpath/includes!hook.api.php/function/h...

File

custom/modules/example_helper/example_helper.module, line 52
example_helper.module - Example module file

Code

function example_helper_menu() {

  $items = array();

  $items ["example-helper/hello-world"] = array(
    "title" => "Hello World!", // Title of the URL
    "page_callback" => "example_helper_display_hello_world_page", // What function to call when the user visits this URL
    "access_callback" => TRUE, // set to TRUE if anonymous users may view this page (no permissions required)
    "page_settings" => array(
      "page_show_title" => TRUE, // must be set to display title at the top of the page.
    ),
    "type" => MENU_TYPE_CALLBACK, // one of several types of menu items.
  );


  return $items;
}