Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Inside mymodule.module
- module_load_include('module', 'mymodule', 'mymodule.menu.inc');
- // Inside mymodule.menu.inc
- function mymodule_menu() {
- $items['pages'] = array(
- 'title' => 'Test',
- 'description' => 'This is a test of having hook_menu() outside of the .module file',
- 'page callback' => '_mymodule_callback_string',
- 'file' => 'mymodule.callback.string.inc',
- 'file path' => drupal_get_path('module', 'mymodule'),
- 'access callback' => TRUE,
- );
- return $items;
- }
Add Comment
Please, Sign In to add comment