I'm developing a module where I use hook_menu
.
I know that I can pass to 'page callback' a function that return string with HTML/PHP code.
function mymodule_menu(){
$items = array();
$items['test'] = array(
'title' => 'page test',
'description' => 'my test',
'page callback' => 'my_page',
'access arguments' => array('access content'),
'type' => MENU_NORMAL_ITEM,
'menu_name' => 'main-menu',
);
return $items;
}
function my_page(){
return '<h1>hello</h1>';
}
How can I pass a whole PHP/HTML page as an argument to 'page callback' => '[my_page.php]'
instead of creating a string inside my_page()
function ?