root / drupal7 / sites / all / themes / adaptivetheme / at_core / templates / book-navigation.tpl.php @ 74f6bef0
1 |
<?php
|
---|---|
2 |
/**
|
3 |
* @file
|
4 |
* Adaptivetheme implementation to navigate books. Presented under nodes that
|
5 |
* are a part of book outlines.
|
6 |
*
|
7 |
* Adaptivetheme variables:
|
8 |
* - $is_mobile: Mixed, requires the Mobile Detect or Browscap module to return
|
9 |
* TRUE for mobile. Note that tablets are also considered mobile devices.
|
10 |
* Returns NULL if the feature could not be detected.
|
11 |
* - $is_tablet: Mixed, requires the Mobile Detect to return TRUE for tablets.
|
12 |
* Returns NULL if the feature could not be detected.
|
13 |
*
|
14 |
* Available variables:
|
15 |
* - $tree: The immediate children of the current node rendered as an
|
16 |
* unordered list.
|
17 |
* - $current_depth: Depth of the current node within the book outline.
|
18 |
* Provided for context.
|
19 |
* - $prev_url: URL to the previous node.
|
20 |
* - $prev_title: Title of the previous node.
|
21 |
* - $parent_url: URL to the parent node.
|
22 |
* - $parent_title: Title of the parent node. Not printed by default. Provided
|
23 |
* as an option.
|
24 |
* - $next_url: URL to the next node.
|
25 |
* - $next_title: Title of the next node.
|
26 |
* - $has_links: Flags TRUE whenever the previous, parent or next data has a
|
27 |
* value.
|
28 |
* - $book_id: The book ID of the current outline being viewed. Same as the
|
29 |
* node ID containing the entire outline. Provided for context.
|
30 |
* - $book_url: The book/node URL of the current outline being viewed.
|
31 |
* Provided as an option. Not used by default.
|
32 |
* - $book_title: The book/node title of the current outline being viewed.
|
33 |
* Provided as an option. Not used by default.
|
34 |
*
|
35 |
* @see template_preprocess_book_navigation()
|
36 |
*/
|
37 |
?>
|
38 |
<?php if ($tree || $has_links): ?> |
39 |
<footer id="book-navigation-<?php print $book_id; ?>" class="book-navigation"> |
40 |
|
41 |
<?php print $tree; ?> |
42 |
|
43 |
<?php if ($has_links): ?> |
44 |
<div class="page-links clearfix"> |
45 |
|
46 |
<?php if ($prev_url) : ?> |
47 |
<a href="<?php print $prev_url; ?>" class="page-previous" title="<?php print t('Go to previous page'); ?>"><?php print t('‹ ') . $prev_title; ?></a> |
48 |
<?php endif; ?> |
49 |
|
50 |
<?php if ($parent_url) : ?> |
51 |
<a href="<?php print $parent_url; ?>" class="page-up" title="<?php print t('Go to parent page'); ?>"><?php print t('up'); ?></a> |
52 |
<?php endif; ?> |
53 |
|
54 |
<?php if ($next_url) : ?> |
55 |
<a href="<?php print $next_url; ?>" class="page-next" title="<?php print t('Go to next page'); ?>"><?php print $next_title . t(' ›'); ?></a> |
56 |
<?php endif; ?> |
57 |
|
58 |
</div>
|
59 |
<?php endif; ?> |
60 |
|
61 |
</footer>
|
62 |
<?php endif; ?> |