I am using Printer, e-mail and PDF versions, and I was wondering if there were a way I could place the print button in node.tpl.php above the $content
area, instead of through the Drupal administration area. Could that be done through a variable?
2 Answers
In the administration area, disable the insertion of the link, then add the following (depending on which modules you use) to your node.tpl.php
:
- Print:
<?php l('Print', 'print/'.$node->nid); ?>
- Print to PDF:
<?php l('PDF version', 'printpdf/'.$node->nid); ?>
- Send by email:
<?php l('Send by email', 'printmail/'.$node->nid); ?>
However given you have your own theme template, it could be better to just modify the CSS applied to the print link(s) to be in a different location on screen.
Another options could be to use something like Display Suite to manage the layout of your node display rather than writing custom templates. Since the Print module implements hook_content_extra_fields, the Print option should show up as a CCK field, that you could then drap/drop to your desired location.
-
Awesome! I wasn't even aware of this module. I have to try it out, but from what I've read it might just change my entire Drupal life, LOL. Thanks!!!– JaneMay 14, 2011 at 17:14