You are here

function template_preprocess_recipe_html_page in Recipe 7

Same name and namespace in other branches
  1. 7.2 modules/recipe_html.module \template_preprocess_recipe_html_page()

File

includes/recipe_html.module, line 89
recipe_html.module - Enables a print view for recipes. This supports full 8-1/2" x 11", and 5"x7" and 3"x5" index cards. Some printers may not be able to deal with small page sizes like this. They may have to print on…

Code

function template_preprocess_recipe_html_page(&$variables) {

  // Add recipe.css file since we are bypassing the normal page rendering routinee to get rid of sidebars and headers.
  $css_path = drupal_get_path("module", "recipe") . "/includes/recipe_html.css";
  $variables['styles'] = '<style type="text/css" media="all">@import url("' . file_create_url($css_path) . '");</style>';
  $variables['title'] = check_plain($variables['node']->title);

  // 'contents' is already rendered.  Use the contents key so as not to confuse template authors.
  $variables['contents'] = $variables['node']->rendered;
}