Printer friendly from page

pobman - March 10, 2007 - 19:57
Project:Content Construction Kit (CCK)
Version:5.x-1.4
Component:content.module
Category:bug report
Priority:normal
Assigned:pobman
Status:duplicate
Description

Very new to this! I have created a detailed form using CCK and filled it in to create a page, which I've added to a book. Using the 'printer friendly' option at the bottom of the page or book, I get only the title and body entries, not the form fields and their contents. Have I missed something? I'd really like to be able to print out the full book after creating the pages in this structured way.

#1

pobman - March 11, 2007 - 08:37

Sorry - thought this was going to a forum. I've moved it now!

#2

KarenS - March 11, 2007 - 13:01
Category:support request» bug report

I think what is missing is to add a 'print' hook to the content module, which I assume would be the same as the 'view' hook. I'm not completely sure how the printer-friendly part is supposed to work, but that appears to be right. Can anyone confirm this? If so, it would be an easy fix.

I'm making this a bug report since I think the content module should be supporting the 'print' hook.

#3

KarenS - March 11, 2007 - 13:10

er, I guess I should say I think we need to add a 'print' op to nodeapi that looks the same as the 'view' op. I keep getting my terminolgy mixed up on hooks and such.

#4

tkgafs - June 1, 2007 - 22:50

Does anyone have an update to this problem or some more pointers as to what exactly would need changed

#5

jshuster - June 2, 2007 - 01:30

I requested a similar feature for the printer friendly module; see http://drupal.org/node/142279.

I mention it here in case there's one change that'd make both CCK and php-generated pages printer friendly.

#6

jonathan_hunt - July 29, 2007 - 07:47

This module appears to be processing the node body directly, instead of using the content array. The following workaround is working for me.

Index: modules/print/print.node.tpl.php
===================================================================
--- modules/print/print.node.tpl.php    (revision 4721)
+++ modules/print/print.node.tpl.php    (working copy)
@@ -31,7 +31,7 @@
     </div>

     <div class="content">
-      <?php print $node->body; ?>
+      <?php print drupal_render($node->content); ?>
     </div>

#7

jcnventura - July 10, 2008 - 11:08
Status:active» duplicate

Marking as duplicate of #195688: Add 'print' to content_nodeapi

 
 

Drupal is a registered trademark of Dries Buytaert.