views:

499

answers:

2

I have a content type called fund.

The contents of this is in node-fund.tpl.php which is inside of page.tpl.php

I have a requirement to recreate the content of fund but without page.tpl.php

So to be clear, i need to have 2 pages

1) fund inside page template 2) the fund data but completely reformatted. The plans is to create pages that print well on an A4

Any thoughts on how i could achieve this.

+1  A: 

How did you create the fund content type? CCK, a custom module or just a simple new content type (i.e. Administer > Content management > Content types > Add content type). AFAIK each approach would have different possibilities.

One option would be to create a print.css file which is used when a webpage is send to the printer. Looking at CSS Design: Going to Print would be a good starting point.

I hope this helps.

Heinrich Filter
A: 

In template.php preprocess___page() you can look for /print on the URL and change the templates with $vars['template_files'].

Cribbed from here

 function phptemplate_preprocess_page(&$vars) {
  if (module_exists('path')) {
    $alias = drupal_get_path_alias(str_replace('/edit','',$_GET['q']));
    if ($alias != $_GET['q']) {
      $suggestions = array();
      $template_filename = 'page';
      foreach (explode('/', $alias) as $path_part) {
        $template_filename = $template_filename . '-' . $path_part;
        $suggestions[] = $template_filename;
      }
      $vars['template_files'] = array_merge((array) $suggestions, $vars['template_files']);
    }
  }
}
Jeremy French