I create a new module from the book module en extended it a little bit.
The problem that I got was, that the navigation beneath the book ( my extra module ) pages doubled.
What I did to solve the problem is :
change
if ($type == 'node' && isset($node->parent)) {

to
if ($type == 'node' && ($node->type == 'book') && isset($node->parent)) {

Is the " isset($node->parent) " still necessary ?

AmigoB,

Comments

dwees’s picture

I'm not sure this has anything to do with my module, but I'll answer it anyway.

The extra conditional is probably unnecessary, $node->parent was a way of identifying the node as type book. However, unless you change the type in the administration menu of Drupal, $node->type == 'book' should suffice.

Dave

amigob’s picture

> I'm not sure this has anything to do with my module

Is this not the bug reports for the book module ?

I changed the book module to work as I think it should do ? ( I can be wrong, ).
And I find it rather strange that an identification is done by a variable name that every other module also can define,

I also had to put a verification of the type in theme_book_navigation to avoid crosstalk between different modules.

AmigoB,

dwees’s picture

This is the bug report for the bookGUI module, which is a different module. You want to post a support request in the core section under 'Drupal' since the book module is a core module.

Dave

dwees’s picture

Status: Active » Closed (fixed)

Closing as accidentally posted in the wrong project.