function tripal_example_help

2.x tripal_example.module tripal_example_help($path, $arg)

Implements hook_help()

Adds a help page to the module list

2 string references to 'tripal_example_help'
tripal_example_menu in tripal_example/tripal_example.module
Implements hook_menu()
tripal_example_theme in tripal_example/tripal_example.module
We need to let Drupal know about our theme functions and their arguments. We create theme functions to allow users of the module to customize the look and feel of the output generated in this module.

File

tripal_example/tripal_example.module, line 309
This file contains all Drupal hooks for the module other than any node hooks and block hooks. Those go in the [module name].chado_node.inc file and [module_name].blocks.inc respectively

Code

function tripal_example_help($path, $arg) {

  // EXPLANATION: in the tripal_example_menu() function above we created a menu
  // item for the help documentation. The menu item specified a function that
  // should be called when the menu item is clicked. This is that function. But,
  // rather than place HTML code in this function we want to have our help
  // documentation in a template file. We specified in the
  // tripal_example_theme() function that we have a template file so now we want
  // to use get the contents of that template file and return it.
  if ($path == 'admin/help#tripal_example') {
    return theme('tripal_example_help', array());
  }
}