Chris@0
|
1 {#
|
Chris@0
|
2 /**
|
Chris@0
|
3 * @file
|
Chris@0
|
4 * Theme override to navigate books.
|
Chris@0
|
5 *
|
Chris@0
|
6 * Presented under nodes that are a part of book outlines.
|
Chris@0
|
7 *
|
Chris@0
|
8 * Available variables:
|
Chris@0
|
9 * - tree: The immediate children of the current node rendered as an unordered
|
Chris@0
|
10 * list.
|
Chris@0
|
11 * - current_depth: Depth of the current node within the book outline. Provided
|
Chris@0
|
12 * for context.
|
Chris@0
|
13 * - prev_url: URL to the previous node.
|
Chris@0
|
14 * - prev_title: Title of the previous node.
|
Chris@0
|
15 * - parent_url: URL to the parent node.
|
Chris@0
|
16 * - parent_title: Title of the parent node. Not printed by default. Provided
|
Chris@0
|
17 * as an option.
|
Chris@0
|
18 * - next_url: URL to the next node.
|
Chris@0
|
19 * - next_title: Title of the next node.
|
Chris@0
|
20 * - has_links: Flags TRUE whenever the previous, parent or next data has a
|
Chris@0
|
21 * value.
|
Chris@0
|
22 * - book_id: The book ID of the current outline being viewed. Same as the node
|
Chris@0
|
23 * ID containing the entire outline. Provided for context.
|
Chris@0
|
24 * - book_url: The book/node URL of the current outline being viewed. Provided
|
Chris@0
|
25 * as an option. Not used by default.
|
Chris@0
|
26 * - book_title: The book/node title of the current outline being viewed.
|
Chris@0
|
27 *
|
Chris@0
|
28 * @see template_preprocess_book_navigation()
|
Chris@0
|
29 */
|
Chris@0
|
30 #}
|
Chris@0
|
31 {% if tree or has_links %}
|
Chris@0
|
32 <nav role="navigation" aria-labelledby="book-label-{{ book_id }}">
|
Chris@0
|
33 {{ tree }}
|
Chris@0
|
34 {% if has_links %}
|
Chris@0
|
35 <h2>{{ 'Book traversal links for'|t }} {{ book_title }}</h2>
|
Chris@0
|
36 <ul>
|
Chris@0
|
37 {% if prev_url %}
|
Chris@0
|
38 <li>
|
Chris@0
|
39 <a href="{{ prev_url }}" rel="prev" title="{{ 'Go to previous page'|t }}"><b>{{ '‹'|t }}</b> {{ prev_title }}</a>
|
Chris@0
|
40 </li>
|
Chris@0
|
41 {% endif %}
|
Chris@0
|
42 {% if parent_url %}
|
Chris@0
|
43 <li>
|
Chris@0
|
44 <a href="{{ parent_url }}" title="{{ 'Go to parent page'|t }}">{{ 'Up'|t }}</a>
|
Chris@0
|
45 </li>
|
Chris@0
|
46 {% endif %}
|
Chris@0
|
47 {% if next_url %}
|
Chris@0
|
48 <li>
|
Chris@0
|
49 <a href="{{ next_url }}" rel="next" title="{{ 'Go to next page'|t }}">{{ next_title }} <b>{{ '›'|t }}</b></a>
|
Chris@0
|
50 </li>
|
Chris@0
|
51 {% endif %}
|
Chris@0
|
52 </ul>
|
Chris@0
|
53 {% endif %}
|
Chris@0
|
54 </nav>
|
Chris@0
|
55 {% endif %}
|