Link should not be created for nodes in a book
bwynants - June 21, 2005 - 12:52
| Project: | Printer, e-mail and PDF versions |
| Component: | User interface |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
I have node entries that are added to a book via the outline tab. for these nodes there should not be a 'print friendly' link since they already have it by default and now they have 2 versions.

#1
+1! alternately, a way to turn off the printable page links for book pages...
#2
Just in case a 4.6 user reads this issue, this module is disabled for book pages in 4.6. :)
#3
I'm using v. 4.6.3 and I am having the same problem.
@firebus: What exactly do you mean by '+1! alternately ...'
#4
In 4.6, the module is indeed disabled for pages whose type is book_page, but not for pages, stories, etc. that have been linked into a book. In line 50 of print.module, it ought to be possible to test for whether the node, regardless of type, is linked into a book outline.
--Bob Richard
#5
This is what I did:
in the print_link function I changed
if ($type == 'node' && variable_get('print_show_link', 1) && $main == 0) {
into
if ($type == 'node' && !isset($node->parent) && variable_get('print_show_link', 1) && $main == 0) {
... works for me!
#6
committed to CVS for Drupal 4.7
#7