Posted by Nick.D on February 27, 2013 at 11:09pm
I've been using Drupal for a while now, but I'm still pretty green when it comes to more advanced implementations. So hopefully this isn't too dumb of a question.
I'm having trouble getting hook_menu to show the page callback themed to use the sites default theme. Instead the page callback is just printed, and only the page callback.
My code, in short, looks like this;
function hook_menu() {
$items['the/link'] = array(
'page callback' => 'page_callback',
'access arguments' => array('access content'),
'access callback' => true,
'type' => MENU_NORMAL_ITEM,
);
return $items
}
function page_callback() {
$output = 'hi';
return $output;
}Thank you for the help.
Comments
The code you've shown there
The code you've shown there won't cause that.
As a side note, you missed the 'title' attribute in your hook_menu() implemenetation. I really doubt this is causing your problem, but you should fix this anyways.
Jaypan We build websites