rump

Untitled

May 18th, 2011
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.49 KB | None | 0 0
  1. // Inside mymodule.module
  2. module_load_include('module', 'mymodule', 'mymodule.menu.inc');
  3.  
  4.  
  5. // Inside mymodule.menu.inc
  6. function mymodule_menu() {
  7.  $items['pages'] = array(
  8.    'title' => 'Test',
  9.    'description' => 'This is a test of having hook_menu() outside of the .module file',
  10.    'page callback' => '_mymodule_callback_string',
  11.    'file' => 'mymodule.callback.string.inc',
  12.    'file path' => drupal_get_path('module', 'mymodule'),
  13.    'access callback' => TRUE,
  14.  );
  15.  
  16.  return $items;
  17. }
Add Comment
Please, Sign In to add comment