You are here

function i18n_book_navigation_token_info in Book translation 7.2

Implements hook_token_info().

Provide tokens similar to the book ones, except these will also be applicable to translated nodes, returning the translated book path. However, depending on the i18n settings, this could have unexpected results and should be used wisely (when translating the book, always start from the top, as to not have "empty" positions in the book path).

File

./i18n_book_navigation.module, line 787
Defines the Book translation module.

Code

function i18n_book_navigation_token_info($type = 'all') {
  $info['tokens']['node']['i18n-book'] = array(
    'name' => t('Translated Book'),
    'description' => t('The book page associated with the node.'),
    'type' => 'menu-link',
  );
  return $info;
}