I want to have Next and Back buttons for nodes within a book.
What is the easiest way to achieve this?
I want to have Next and Back buttons for nodes within a book.
What is the easiest way to achieve this?
ok, this can be achieved by overriding of modules\books\book-navigation.tpl file. Copy this file to your Theme and change following:
<?php if ($has_links): ?>
<div class="page-links clearfix">
<?php if ($prev_url): ?>
<a href="<?php print $prev_url; ?>" class="page-previous" title="<?php print t('Go to previous page'); ?>"><?php print t('‹ ') . $prev_title; ?></a>
<?php endif; ?>
<?php if ($parent_url): ?>
<a href="<?php print $parent_url; ?>" class="page-up" title="<?php print t('Go to parent page'); ?>"><?php print t('up'); ?></a>
<?php endif; ?>
<?php if ($next_url): ?>
<a href="<?php print $next_url; ?>" class="page-next" title="<?php print t('Go to next page'); ?>"><?php print $next_title . t(' ›'); ?></a>
<?php endif; ?>
</div>
<?php endif; ?>
to:
<?php if ($has_links): ?>
<div class="page-links clearfix">
<?php if ($prev_url): ?>
<a href="<?php print $prev_url; ?>" class="page-previous" title="<?php print t('Go to previous page'); ?>"><?php print t('Back') ?></a>
<?php endif; ?>
<?php if ($parent_url): ?>
<a href="<?php print $parent_url; ?>" class="page-up" title="<?php print t('Go to parent page'); ?>"><?php print t('up'); ?></a>
<?php endif; ?>
<?php if ($next_url): ?>
<a href="<?php print $next_url; ?>" class="page-next" title="<?php print t('Go to next page'); ?>"><?php print t('Next'); ?></a>
<?php endif; ?>
</div>
<?php endif; ?>
You could try one of the following modules: http://drupal.org/project/prev_next or http://drupal.org/project/custom_pagers. We've been using the Prev/Next module for a while in a project.