Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
By onepairofpants on
So I am new to Drupal but I have some PHP experience (created a lo-fi cms for a client a few years back). I am trying to create a node-book.tpl.php to customize the book output. I know there might be easier ways of doing this but part of the idea is to learn drupal. That said, I can't figure out why the book_navigation function call returns nothing when i place it in the tpl file...
<div class="node<?php if ($sticky) { print " sticky"; } ?><?php if (!$status) { print " node-unpublished"; } ?>">
<?php if ($picture) {
print $picture;
}?>
<?php if ($page == 0) { ?><h2 class="title"><a href="<?php print $node_url?>"><?php print $title?></a></h2><?php }; ?>
<span class="submitted"><?php print $submitted?></span>
<span class="taxonomy"><?php print $terms?></span>
<div class="content">
<?php theme('book_navigation', $node) ?>
</div>
<?php if ($links) { ?><div class="links">» <?php print $links?></div><?php }; ?>
</div>
Any Ideas? I imagine I am missing something really obvious but I am stumped. I will keep looking but any help would be greatly appreciated.
Thanks in advance....
Comments
Someday your prints will come :)
You are missing a call to 'print' so
<?php theme('book_navigation', $node) ?>
should be
<?php print theme('book_navigation', $node) ?>
Thanx!
Awesome.
I knew it was something stupid. Thanks for the help. I was banging my head against the wall.