2007-11-04 14:29:09 +00:00
|
|
|
|
<?php
|
|
|
|
|
/**
|
2008-05-15 21:19:24 +00:00
|
|
|
|
* @file
|
2011-12-13 03:13:23 +00:00
|
|
|
|
* Default theme implementation to navigate books.
|
|
|
|
|
*
|
|
|
|
|
* Presented under nodes that are a part of book outlines.
|
2007-11-04 14:29:09 +00:00
|
|
|
|
*
|
|
|
|
|
* Available variables:
|
2011-12-13 03:13:23 +00:00
|
|
|
|
* - $tree: The immediate children of the current node rendered as an unordered
|
|
|
|
|
* list.
|
|
|
|
|
* - $current_depth: Depth of the current node within the book outline. Provided
|
|
|
|
|
* for context.
|
2007-11-04 14:29:09 +00:00
|
|
|
|
* - $prev_url: URL to the previous node.
|
|
|
|
|
* - $prev_title: Title of the previous node.
|
|
|
|
|
* - $parent_url: URL to the parent node.
|
|
|
|
|
* - $parent_title: Title of the parent node. Not printed by default. Provided
|
|
|
|
|
* as an option.
|
|
|
|
|
* - $next_url: URL to the next node.
|
|
|
|
|
* - $next_title: Title of the next node.
|
|
|
|
|
* - $has_links: Flags TRUE whenever the previous, parent or next data has a
|
|
|
|
|
* value.
|
2011-12-13 03:13:23 +00:00
|
|
|
|
* - $book_id: The book ID of the current outline being viewed. Same as the node
|
|
|
|
|
* ID containing the entire outline. Provided for context.
|
|
|
|
|
* - $book_url: The book/node URL of the current outline being viewed. Provided
|
|
|
|
|
* as an option. Not used by default.
|
2007-11-04 14:29:09 +00:00
|
|
|
|
* - $book_title: The book/node title of the current outline being viewed.
|
|
|
|
|
* Provided as an option. Not used by default.
|
|
|
|
|
*
|
|
|
|
|
* @see template_preprocess_book_navigation()
|
2011-12-13 03:13:23 +00:00
|
|
|
|
*
|
|
|
|
|
* @ingroup themeable
|
2007-11-04 14:29:09 +00:00
|
|
|
|
*/
|
|
|
|
|
?>
|
|
|
|
|
<?php if ($tree || $has_links): ?>
|
2011-11-17 06:07:01 +00:00
|
|
|
|
<nav id="book-navigation-<?php print $book_id; ?>" class="book-navigation">
|
2007-11-04 14:29:09 +00:00
|
|
|
|
<?php print $tree; ?>
|
|
|
|
|
<?php if ($has_links): ?>
|
2011-11-17 06:07:01 +00:00
|
|
|
|
<h2 class="element-invisible"><?php print t('Book Navigation'); ?></h2>
|
|
|
|
|
<ul class="book-pager">
|
2011-09-12 00:29:15 +00:00
|
|
|
|
<?php if ($prev_url): ?>
|
2011-11-17 06:07:01 +00:00
|
|
|
|
<li class="previous">
|
|
|
|
|
<a href="<?php print $prev_url; ?>" rel="prev" title="<?php print t('Go to previous page'); ?>"><b><?php print t('‹'); ?></b> <?php print $prev_title; ?></a>
|
|
|
|
|
</li>
|
2007-11-04 14:29:09 +00:00
|
|
|
|
<?php endif; ?>
|
2011-09-12 00:29:15 +00:00
|
|
|
|
<?php if ($parent_url): ?>
|
2011-11-17 06:07:01 +00:00
|
|
|
|
<li class="up">
|
|
|
|
|
<a href="<?php print $parent_url; ?>" title="<?php print t('Go to parent page'); ?>"><?php print t('up'); ?></a>
|
|
|
|
|
</li>
|
2007-11-04 14:29:09 +00:00
|
|
|
|
<?php endif; ?>
|
2011-09-12 00:29:15 +00:00
|
|
|
|
<?php if ($next_url): ?>
|
2011-11-17 06:07:01 +00:00
|
|
|
|
<li class="next">
|
|
|
|
|
<a href="<?php print $next_url; ?>" rel="next" title="<?php print t('Go to next page'); ?>"><?php print $next_title;?> <b><?php print t('›'); ?></b></a>
|
|
|
|
|
</li>
|
2007-11-04 14:29:09 +00:00
|
|
|
|
<?php endif; ?>
|
2011-11-17 06:07:01 +00:00
|
|
|
|
</ul>
|
2007-11-04 14:29:09 +00:00
|
|
|
|
<?php endif; ?>
|
2011-11-17 06:07:01 +00:00
|
|
|
|
</nav>
|
2007-11-04 14:29:09 +00:00
|
|
|
|
<?php endif; ?>
|