Let a book page appear in multiple books

moshe weitzman - February 16, 2004 - 22:22
Project:Drupal
Version:7.x-dev
Component:book.module
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

Any node may be included in the book. But alas, it may appear only once. Thats so unDrupal. This request is to allow the same node to appear in multiple places in the book, similar to the vocabulary system.

#1

moshe weitzman - March 6, 2004 - 17:22

Kjartan says that the plumbing is in place to handle this. We just need to alter the UI

#2

moshe weitzman - March 6, 2004 - 19:44

I've done a bit of hacking on this with good success. Hopefully some one else can finish the job.

As a proof of concept, I changed the primary key in the book table to a normal key. Then I added a row in book table for an existing nid with a different parent. Everything displayed as expected (including printer friendly), so thats a good sign.

In order to complete this task, we need the following:

- break down current book table into book and book_hierarchy. The nid field should appear kin both. The parent field should move to the hierarchy table. Then change all queries to use the right table. Also write a conversion script for existing sites.
- adjust _form() hook we allow multiple parent nodes to be selected
- handle the form() submission so we can save multiple parents for a page

#3

nernst - April 21, 2004 - 21:24

Is the code for your experiment in the sandbox? I'm interested in a related feature, allowing the same node to appear in multiple books (the inverse relationship, I suppose). Seems simple enough to do, using, as you say, a two table approach to indicate book hierarchies e.g. node 345 has parent 222, node 345 has parent 499, etc.

Neil

#4

moshe weitzman - April 21, 2004 - 21:31

i didn't write any code. I just changed one index in the book table and added a record manualy (as described in this issue) ... you get to finishing the job. see my 'next steps' paragraph.

#5

nernst - May 3, 2004 - 19:36

Ok, I'll give it a shot. I think the book_hierarchy table should also contain 'weight', however, so that people can specify the weighting per book and not per node.

#6

shane - September 16, 2004 - 17:16

Has this feature died? Is anyone still working on it? Just was curious if anyone had made any headway on this. I like the book module a lot and use it extensively. Would love to see it "updated" to be as flexible as the rest of Drupal. TIA.

#7

mcduarte2000 - January 3, 2006 - 12:23

Still nothing?

I also needed this so much...

#8

puregin - February 13, 2006 - 22:37
Title:Let node appear mutliple times in a book» Let a node appear multiple times in a book

Correcting the title. Djun

#9

jorisx - November 9, 2006 - 23:24

So this is not working yet...
I've just posted a question about this: http://drupal.org/node/93870

It would be graeat to have this feature working :-)

#10

add1sun - February 20, 2007 - 15:50
Version:x.y.z» 6.x-dev

I'm very interested in this feature getting in. Specifically I am thinking about it in terms of the d.o handbooks. Some recent discussions around some new paradigms for documentation has introduced the idea of leading a new user through the documentation based on specific goals they may have see Create First Steps Handbook issue and SoC Getting Started guide request. An example of this is the SoC Getting Started with Drupal Dev guide. The intention of the new guide would be to highlight and give context to areas of the handbook that would be most pertinent to someone familiar with PHP and coding but not Drupal. Instead of rewriting material that is already well covered in the existing handbooks, the plan is to link to those "outside" resources. The problem with this though is that as someone reads the Getting Started guide and they click a link, they are then taken out of context and plopped down in the book that the resource resides in. This disrupts the "flow" that a child or sibling page would provide. If those pages could be assigned to both their "main" book (e.g. CVS) and also to the Getting Started book, it would provide a real tool to be leveraged by the Drupal documentation team.

If folks think this is a worthwhile effort, I'm willing to try to picking this up and making something happen with it.

#11

Tresler - February 20, 2007 - 21:08

I have t wonder, if we're talking about weight and multiple parents for book nodes, does it make sense to just have a "Book" vocabulary created when a new book is created. Then instead of a book heirarchy table, we just use what we have.

I'd envision this working similar to the way you can put a single image in multiple galleries with image.module by manipulating the "Images" vocabulary.

Not sure how book module works currently (I think its CCK as of 5.0?). This would also involve putting an entry into the taxonomy system for every new page, but I think that can be the key (not the title, obviously).

thoguhts?

#12

Senpai - March 26, 2007 - 05:25

I'd have to say that a taxo entry for each new book page would become exceedingly tedious, given the amount of new teaching materials I'm planning to create with this tool when it finally gets done. The drupal.org First Steps guides are impossible to correctly implement without this new tool, however, so I hope it gets done soon.

#13

mclemmens - April 11, 2007 - 07:01
Version:6.x-dev» 5.1

is "Let a node appear multiple times in a book" evolving at all? I think it would be a great idea. Can it be done by installing CCK?

#14

spatz4000 - April 11, 2007 - 12:28
Version:5.1» 6.x-dev

Features go in development.

#15

add1sun - April 11, 2007 - 13:41

This issue will probably have to wait until the larger changes to book/outline in core are determined at this point. There are ideas on those changes but so far not a concerted effort at this point to get it into 6.

#16

spatz4000 - July 18, 2007 - 13:43
Version:6.x-dev» 7.x-dev

#17

gmasky - July 27, 2007 - 12:33
Title:Let a node appear multiple times in a book» Let a book page appear in multiple books

I am trying to link a book page to multiple books.

Can this be done and how?

With categories, I can link a node to multiple categories.

Thanx

#18

glass.dimly - June 15, 2008 - 20:32
Version:7.x-dev» 5.x-dev

Gee, this is a really important feature. I hope somebody really smart is making this so, and if they were making it so, it would be great to have a module that would do this.

How have people been working around this in their sites?
-Jeremy

Update: here's the work around for 5.x: http://drupal.org/node/93870#comment-883186

#19

mooffie - June 15, 2008 - 22:30
Version:5.x-dev» 7.x-dev

By marking this 5.x you're effectively killing this issue. 5.x gets no new features.

#20

MikeSchinkel - July 8, 2008 - 05:18
Version:7.x-dev» 5.7

What's the rationale for not allowing 5.x to be updated? I've got a 5.x site that needs this (and can't be upgraded because needed modules are not ready for 6.x) and depending on how hard it is I might be willing to code it.

#21

Nick Lewis - July 10, 2008 - 19:11
Version:5.7» 7.x-dev

The policy is to not add new features to previous versions of drupal, only security/bug fixes can go into versions older than 7.x. Its not that we don't care about users in previous versions, its that we are trying to do the most with the limited development resources we have. Drupal 5.x is a stable release -- adding new features would destabilize it (it would, for example, screw up sites that had custom work done to their book module). Destabilizing what we call a stable build is a great way to ruin our reputation.

I feel ya on upgrading pains -- but that said, I learn a lot of new things about drupal everytime I upgrade modules -- its good for building ninja skills. When you begin to get comfortable with 6's apis, you will never look back to the dark days of 5.x....

As far as this patch is concerned, I think book pages should be able to reference pages in other books (e.g. 'related pages') in core, but I don't think a book page should be able to have two direct parents. The breadcrumb/pathauto/display issues + duplicate content penalities in google + interface complexity make it impractical. You'd need to add weights to parents, as well as children to make it work -- lots of moving parts. Having a second class relationship available to cross link content would be a great idea however, imho. That's sort of what taxonomy does -- but taxonomy is more like a bucket, where as a book should look like a pyramid by design.

 
 

Drupal is a registered trademark of Dries Buytaert.