I am just tried to create a module name mymodule
and tried to apply theme to that module in drupal6.
I have added .info file for my module and created mymodule.tpl.php
file in my theme folder and enable the module from the admin. But when i access the module through url it returns white page.
My mymodule.module.php file contains
function mymodule_menu() {
$items = array();
$items['mymodule'] = array(
'page callback' => 'mymodule_page',
'access arguments' => array('access content'),
'type' => MENU_CALLBACK,
);
return $items;
}
function mymodule_page() {
$result = db_query('SELECT * from node');
return theme('mymodule', array('output' => $result));
}
function mymodule_theme() {
$content = array(
'custom' => array(
'arguments' => array('output' => 'NULL'),
'template' => path_to_theme() . '/mymodule',
'path' => '/'
),
);
return $content;
}
I don't know why the theme is not applying to my module. Please help.