Hi,

I need an help with my first module.

I have a code like this.

function mymodule_menu() {
 $items['mymodule'] = array(
'title' => 'test',
'page callback' => 'mymodule_page',
'access arguments' => array('access content'),
 );

function mymodule_page (){
print "test";

}

test come in a blank page.

why?

how do i include it in a themed page in the content area?

Thanks a lot to everyone

Comments

nevets’s picture

Change

print "test";

to

return "test";
carlogen’s picture

Hi nevets,

thanks for your reply.
with this code

function mymodule_menu() {
$items['mymodule'] = array(
'title' => 'test',
'page callback' => 'mymodule_page',
'access arguments' => array('access content'),
);

function mymodule_page (){
return "test";

}

the page is completely blank "test" is not showed at all.

carlogen’s picture

there was a typo error in my code.
i fixed it
thanks a lot.