You are here

function nd_book_navigation in Display Suite 6.3

Book navigation theming.

File

modules/nd/nd.module, line 703
Node displays.

Code

function nd_book_navigation($field) {
  $content = '';
  if (isset($field['object']->content['book_navigation'])) {
    if (isset($field['object']->content['book_navigation']['#value'])) {
      $content = $field['object']->content['book_navigation']['#value'];
    }
    elseif (isset($field['object']->book['bid']) && !empty($field['object']->book['bid'])) {
      $content = theme('book_navigation', $field['object']->book);
    }
  }
  else {
    if (isset($field['object']->book['bid']) && !empty($field['object']->book['bid'])) {
      $content = theme('book_navigation', $field['object']->book);
    }
  }
  return $content;
}