Projet

Général

Profil

Paste
Télécharger (2,09 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / themes / bootstrap / templates / book / book-navigation.tpl.php @ 4eeb3b46

1
<?php
2
/**
3
 * @file
4
 * Default theme implementation to navigate books.
5
 *
6
 * Presented under nodes that are a part of book outlines.
7
 *
8
 * Available variables:
9
 * - $tree: The immediate children of the current node rendered as an unordered
10
 *   list.
11
 * - $current_depth: Depth of the current node within the book outline. Provided
12
 *   for context.
13
 * - $prev_url: URL to the previous node.
14
 * - $prev_title: Title of the previous node.
15
 * - $parent_url: URL to the parent node.
16
 * - $parent_title: Title of the parent node. Not printed by default. Provided
17
 *   as an option.
18
 * - $next_url: URL to the next node.
19
 * - $next_title: Title of the next node.
20
 * - $has_links: Flags TRUE whenever the previous, parent or next data has a
21
 *   value.
22
 * - $book_id: The book ID of the current outline being viewed. Same as the node
23
 *   ID containing the entire outline. Provided for context.
24
 * - $book_url: The book/node URL of the current outline being viewed. Provided
25
 *   as an option. Not used by default.
26
 * - $book_title: The book/node title of the current outline being viewed.
27
 *   Provided as an option. Not used by default.
28
 *
29
 * @see template_preprocess_book_navigation()
30
 *
31
 * @ingroup templates
32
 */
33
?>
34
<?php if ($tree || $has_links): ?>
35
  <div id="book-navigation-<?php print $book_id; ?>" class="book-navigation">
36
    <?php print $tree; ?>
37

    
38
    <?php if ($has_links): ?>
39
    <ul class="pager clearfix">
40
      <?php if ($prev_url): ?>
41
        <li class="previous"><a href="<?php print $prev_url; ?>" class="page-previous" title="<?php print t('Go to previous page'); ?>"><?php print t('') . $prev_title; ?></a></li>
42
      <?php endif; ?>
43
      <?php if ($parent_url): ?>
44
        <li><a href="<?php print $parent_url; ?>" class="page-up" title="<?php print t('Go to parent page'); ?>"><?php print t('up'); ?></a></li>
45
      <?php endif; ?>
46
      <?php if ($next_url): ?>
47
        <li class="next"><a href="<?php print $next_url; ?>" class="page-next" title="<?php print t('Go to next page'); ?>"><?php print $next_title . t(''); ?></a></li>
48
      <?php endif; ?>
49
    </ul>
50
    <?php endif; ?>
51

    
52
  </div>
53
<?php endif; ?>