WebTechKitchen; Your Web Technology Kitchen, contact us to create, or maintain your websites and other digital properties.

Print out a page without the template header, footer, blocks, etc.

Submitted by barnettech on Fri, 05/14/2010 - 08:32

http://www.drupalcoder.com/story/718-how-to-define-page-callbacks-that-…

I haven't tried it yet, but this was a good post on Drupal Planet. I haven't needed to do this yet, but I know I will :)


/**
 * Implementation of hook_menu().
 */
function my_module_menu() {
  $items['hello'] = array(
    'title' => 'Hello world',
    'page callback' => 'my_module_page',
    'access callback' => TRUE,
  );
}

function my_module_page() {
  return t('Hello world');
  return null;
}