book_link does not handle correct when a nother node type has also a parent variable ?
amigob - September 9, 2007 - 21:33
| Project: | BookGUI |
| Version: | 5.x-1.0.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
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,

#1
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
#2
> 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,
#3
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
#4
Closing as accidentally posted in the wrong project.