You are here

function print_preprocess_print_page in Printer, email and PDF versions 5.x

Same name and namespace in other branches
  1. 6 print.module \print_preprocess_print_page()

Implementation of hook_preprocess_HOOK().

File

./print.module, line 134
Displays Printer-friendly versions of Drupal pages.

Code

function print_preprocess_print_page(&$variables) {
  $format = $variables['type'];
  if (isset($variables['node']->type)) {
    $type = $variables['node']->type;
    $variables['show_blocks'] = FALSE;
    $variables['show_messages'] = FALSE;
    template_preprocess_page($variables);
  }
  else {
    $type = '';
  }
  $variables['template_files'][] = "print";
  $variables['template_files'][] = "print.node-{$type}";
  $variables['template_files'][] = "print_{$format}";
  $variables['template_files'][] = "print_{$format}.node-{$type}";
}