page_example_help

Versions
4.6 – 5
page_example_help($section)
6 – 7
page_example_help($path, $arg)

Implementation of hook_help().

Throughout Drupal, hook_help() is used to display help text at the top of pages. Some other parts of Drupal pages get explanatory text from these hooks as well. We use it here to illustrate how to add help text to the pages your module defines.

Code

developer/examples/page_example.module, line 17

<?php
function page_example_help($path, $arg) {
  switch ($path) {
    case 'foo':
      // Here is some help text for a custom page.
      return t('This sentence contains all the letters in the English alphabet.');
  }
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.