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
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

firebus - September 1, 2005 - 01:54

+1! alternately, a way to turn off the printable page links for book pages...

#2

noid - September 13, 2005 - 06:05

Just in case a 4.6 user reads this issue, this module is disabled for book pages in 4.6. :)

#3

Norrin - September 14, 2005 - 14:02

I'm using v. 4.6.3 and I am having the same problem.

@firebus: What exactly do you mean by '+1! alternately ...'

#4

rrichard63 - September 15, 2005 - 17:12

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

bwynants - September 16, 2005 - 07:39

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

deekayen - December 21, 2005 - 00:58
Status:active» fixed

committed to CVS for Drupal 4.7

#7

Anonymous - January 4, 2006 - 01:00
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.