New node - new book root

nbchip - April 19, 2008 - 21:32

Is ti possible to automaticly create Book root when creating new specific Content type?
Example I have first Content Type called ARTICLE , and the second CT called ARTICLE PAGE...
so When ever creating Article i want it to be Book root.

Also when having lots of books and pages, it would be nice to seperate adding node in the book structure in two select list. First u choose the exact book u want to put node into, and then the place in the structure of that book...

How DB intensive is printing book layout?
Is there a better way to have some hierarchy inside articles?

Thx.

Which ever content-type you

budda - April 20, 2008 - 02:01

Which ever content-type you create from the 'create content' menu, they always start at as the Book parent. Or at least that's how I remember it.

It's only when you visit a book page, and then click 'add child page' that the books parent is set in the node/add form.

But to answer your question, some simple hook_form_alter() function magic in a custom module should allow you to default the parent selector depending on the content-type name. You may even be able to get away without writing any code, and instead using the form alter module available here on d.o.

I've not used Drupal 6's Book/outline system so am just going off Drupal 5 and 4.7 on the above.

--
Ixis (UK) providing Drupal consultancy and Drupal theme design. Check the portfolio.

See BookMadeSimple

MarcElbichon - August 12, 2008 - 11:20

I've created a module (BookMadeSimple) which can do this.

  1. You can automatically create a main book page for any content type (customized in admin section)
  2. It adds a dropdown listbox in book links to add any child content. Selecting the content type in the dropdown list box will add it as child page

For more explications, see BookMadeSimple home page

Very nice module

nbchip - August 13, 2008 - 01:18

Does just what i need. There is a issue with closing php tags in .module and i would have some feature requests but link to module now gives - Access denied.
Thx.

Post to code.google.com

MarcElbichon - August 13, 2008 - 08:26

The project has been disabled by administrators. Will correct this.
For the moment, please post your comments or issues to http://code.google.com/p/mmr-drupal-modules/wiki/BookMadeSimple

BookMadeSimple homepage avaliable

MarcElbichon - August 14, 2008 - 09:50

BoolMadeSimple HomePage is now avaliable !

 
 

Drupal is a registered trademark of Dries Buytaert.