I am using the most recent version of 5.x. I have created a CCK content type, and a unique node-content.tpl.php file to control output. Each of these content pages is also outlined in a book, using the outline.module. However, at the bottom of the page, where the book page navigation usually appears, there is no navigation. On non-unique content nodes (page, story) the book page navigation appears correctly.

How do I add this in to my page.tpl.php file? I have looked at the following pages: http://drupal.org/node/35464, but I really just want to output the simple book navigation. I am assuming that the problem is that in my tpl.php file, I am NOT using the $body function, since this actually outputs ALL the CCK fields, rather than letting me output them distinctly (this is somehow a CCK, contemplate, core issue).

Instead, the $body is output like this:

	<?php print $node->content['body']['#value'] ?>

However, this seems to neglect the book nagivation which is normally a part of the body. Any snippets on how to call the book pager function in my tpl.php file?

Many thanks,
Maria

Comments

mariagwyn’s picture

Solved, silly me:

print theme('book_navigation', $node)

mariagwyn’s picture

Okay, it appears that I did not entirely solve the problem. Now, on every unique content page, a book navigation section appears, even if the node is not outlined in a book. The navigation area is simply empty.

So, does someone know the "if" statment which will call the above php function only if the particular node is in outlined within book?

Thanks!
Maria

mariagwyn’s picture

Anybody? I am at a loss as to how to construct the 'if' function.

Thanks,
Maria

mariagwyn’s picture

Anybody?

jfall’s picture

I'm looking for information about customizing the book navigation...

But I'm doing the same thing - outlining custom CCK type to a book - and the navigation works just fine. You shouldn't need to modify the tpl file at all, because the navigation bar is embedded in $content:

$content['book_navigation']

I suppose if you really need to follow this route, you could check:
if ($content['book_navigation']['#value']) :
but as I said, it works for me right out of the box (D5.7, CCK 1.6)

The problem I have is that it plonks the book navigation in the middle of my content, so I want to control where it goes....

good luck.