Greetings everyone.
I have been making progress in learning to write my own modules for a while now, but one thing has been eluding me that is probably quite simple.
I have created menu items in the left side of the window, and can make them pull specific pages. All fine and dandy. The problem is trying to specify a page with my own code to
be executed. Rather than pull a page created through the API. I want to do more than the input filters will allow. The following is an example of the menu item:
################
function mymodule_menu() {
$items = array();
$items['pagetodisplay'] = array(
'title' => 'My Module',
'page callback' => 'MyModule',
'description' => 'Razzin Friggen!',
'access arguments' => array('access MyModule'),
);
################
Very simply, I want to have my menu item pull 'pagetodisplay' via a function found in the module I have been developing. Who can point me to a resource towards making this page ? I am hoping to define it in a function. I have read and poked through the following documents found here:
Thanks in advance
- Dan.
Comments
page_callback is a function,
page_callback is a function, so for example if your module is mymodule, you might use
'page callback' => 'myodule_pagetodisplay',and define the function 'myodule_pagetodisplay''.DOH!
Many Thanks.
It's always in the friggen details!
- Dan.