1

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 2

1

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.

2
  • +1 for CSS being a good way to deal with this, leaving the markup nicely ordered.
    – Andy
    Commented May 14, 2011 at 12:17
  • Great -- thanks! So then use absolute Positioning to move it above the $content area? Yeah I guess that makes sense.
    – Jane
    Commented May 14, 2011 at 12:27
1

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.

1
  • 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!!!
    – Jane
    Commented May 14, 2011 at 17:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.