_menu_example_menu_page

6 menu_example.module _menu_example_menu_page($content = NULL, $arg1 = NULL, $arg2 = NULL)
7 menu_example.module _menu_example_menu_page($content = NULL, $arg1 = NULL, $arg2 = NULL)
8 menu_example.module _menu_example_menu_page($content = NULL, $arg1 = NULL, $arg2 = NULL)

Page callback for use with most of the menu entries. The arguments it receives determine what it outputs.

Parameters

$content: The base content to output.

$arg1: First additional argument from the path used to access the menu

$arg2: Second additional argument.

Related topics

1 string reference to '_menu_example_menu_page'

File

menu_example/menu_example.module, line 310
Demonstrates uses of the Menu APIs in Drupal, including hook_menu(), hook_menu_alter(), and hook_menu_link_alter().

Code

function _menu_example_menu_page($content = NULL, $arg1 = NULL, $arg2 = NULL) {
  $output =  '<div>' . $content . '</div>';

  if (!empty($arg1)) {
    $output .= '<div>' . t('Argument 1=%arg', array('%arg' => $arg1)) . '</div>';
  }
  if (!empty($arg2)) {
    $output .= '<div>' . t('Argument 2=%arg', array('%arg' => $arg2)) . '</div>';
  }
  return $output;
}
Login or register to post comments