| 1 | <?php |
| 2 | // $Id: book-navigation.tpl.php,v 1.3 2009/02/18 14:28:21 webchick Exp $ |
| 3 | |
| 4 | /** |
| 5 | * @file |
| 6 | * Default theme implementation to navigate books. Presented under nodes that |
| 7 | * are a part of book outlines. |
| 8 | * |
| 9 | * Available variables: |
| 10 | * - $tree: The immediate children of the current node rendered as an |
| 11 | * unordered list. |
| 12 | * - $current_depth: Depth of the current node within the book outline. |
| 13 | * Provided for context. |
| 14 | * - $prev_url: URL to the previous node. |
| 15 | * - $prev_title: Title of the previous node. |
| 16 | * - $parent_url: URL to the parent node. |
| 17 | * - $parent_title: Title of the parent node. Not printed by default. Provided |
| 18 | * as an option. |
| 19 | * - $next_url: URL to the next node. |
| 20 | * - $next_title: Title of the next node. |
| 21 | * - $has_links: Flags TRUE whenever the previous, parent or next data has a |
| 22 | * value. |
| 23 | * - $book_id: The book ID of the current outline being viewed. Same as the |
| 24 | * node ID containing the entire outline. Provided for context. |
| 25 | * - $book_url: The book/node URL of the current outline being viewed. |
| 26 | * Provided as an option. Not used by default. |
| 27 | * - $book_title: The book/node title of the current outline being viewed. |
| 28 | * Provided as an option. Not used by default. |
| 29 | * |
| 30 | * @see template_preprocess_book_navigation() |
| 31 | */ |
| 32 | ?> |
| 33 | <?php if ($tree || $has_links): ?> |
| 34 | <div id="book-navigation-<?php print $book_id; ?>" class="book-navigation"> |
| 35 | <?php print $tree; ?> |
| 36 | |
| 37 | <?php if ($has_links): ?> |
| 38 | <div class="page-links clearfix"> |
| 39 | <?php if ($prev_url) : ?> |
| 40 | <a href="<?php print $prev_url; ?>" class="page-previous" title="<?php print t('Go to previous page'); ?>"><?php print t('‹ ') . $prev_title; ?></a> |
| 41 | <?php endif; ?> |
| 42 | <?php if ($parent_url) : ?> |
| 43 | <a href="<?php print $parent_url; ?>" class="page-up" title="<?php print t('Go to parent page'); ?>"><?php print t('up'); ?></a> |
| 44 | <?php endif; ?> |
| 45 | <?php if ($next_url) : ?> |
| 46 | <a href="<?php print $next_url; ?>" class="page-next" title="<?php print t('Go to next page'); ?>"><?php print $next_title . t(' ›'); ?></a> |
| 47 | <?php endif; ?> |
| 48 | </div> |
| 49 | <?php endif; ?> |
| 50 | |
| 51 | </div> |
| 52 | <?php endif; ?> |
| 53 |