You are here

function i18n_book_navigation_theme in Book translation 6

Same name and namespace in other branches
  1. 6.2 i18n_book_navigation.module \i18n_book_navigation_theme()
  2. 7.2 i18n_book_navigation.module \i18n_book_navigation_theme()

Implementation of hook_theme()

The i18n_book_navigation uses the book-navigation.tpl.php file for theming the "footer" book navigation in book pages. It will use it to display this navigation on translated nodes, even if they're not part of a book outline.

The i18n_book_navigation_block uses the book-all-books-block.tpl.php for theming a Book navigation block, similar to the original Book navigation. The difference is this creates a new Block that will outline nodes even if they're translated and not part of a book outline.

File

./i18n_book_navigation.module, line 16

Code

function i18n_book_navigation_theme($existing, $type, $theme, $path) {
  return array(
    'i18n_book_navigation' => array(
      'arguments' => array(
        'book_link' => NULL,
      ),
      'path' => drupal_get_path('module', 'book'),
      'template' => 'book-navigation',
    ),
    'i18n_book_navigation_block' => array(
      'arguments' => array(
        'book_menus' => array(),
      ),
      'path' => drupal_get_path('module', 'book'),
      'template' => 'book-all-books-block',
    ),
  );
}