For some reasons I need the functionality of book module a second time. So I duplicated the book module using the term "instruction" instead of "book" in book.module (by replacing "book" with "instruction"). Also I created a instruction table in mysql. So now I have a "instruction module" with the same functionality like the book module.

Everything works fine except the navigation links at the bottom of the instruction-pages (previous up next) are not located as they should. (But they work)

Connected with the book page they are correct
previous up next

Connected with the instruction page (duplicated form) they are not correct, like this

previous
next
up

Is there any suggestion how to put the navigation links into the correct place. Thanks

Comments

dries’s picture

You probably want to duplicate the book module specific CSS code in misc/drupal.css. Search misc/drupal.css for 'book' and you will find ...

univie’s picture

Thank You very much. Itworks.

bali’s picture

Can this duplication trick be done with node.module too?

killes@www.drop.org’s picture

But you will find that many modules call explicitly some function that is in node.module.

bali’s picture

My purpose would be to present taxonomies more selectively. We use a lot of af taxonomies which add up to a long list of in edit forms. With duplicate and renamend node.modules I could be more precise as to which keyword lists are presented on which pages. Could you see the duplication trick work for this purpose?

killes@www.drop.org’s picture

I am not sure that this would work. I think duplicating the book (or whatever) module would be better. The reason for this is that you assign vocabularies to node types. Duplicating node.module wouldn't give you different node types.

moshe weitzman’s picture

duplicated node module will cause serious problem. perhaps you could describe your optimum 'add/edit' form and we can discuss how to get there

bali’s picture

Basically I would like to offer my users templates. Each template would have a different set of keywords attached. I would also like to offer default content in the body field (to provide in structure).

I understand now that I was looking at the wrong architectural level and that using duplicates of book.module (instead of node.module) is (probably?) the way to go. From the previous discussion I gather that duplicating book.module involves three steps:

1. Duplicate book.module and rename 'book' to 'newtype' throughout.
2. Duplicate the book table and name it 'newtype'.
3. Duplicate book-related entries in drupal.css and rename them 'newtype'.

Would that be it? Or am I missing something?

How could the default body content be realised? From what I see in the code there is no obvious place to define a default body.

On a side note: Would a description of this procedure be interesting for the Drupal documentation?

univie’s picture

I tried this simple duplication also with forum.module. It works fine (Change "forum" to "forum1" in forum.module, create a forum1 table in mysql. That's it.)

mj2308’s picture

I tried doing this in 4.7 and ran into some functionality issues, posted about it http://drupal.org/node/67604, anyone have any ideas?

Thanks!
JH