You are here

function flippy_node_view in Flippy 7

Same name and namespace in other branches
  1. 8 flippy.module \flippy_node_view()

Implements hook_node_view().

File

./flippy.module, line 293
Allows administrators to add previous/next pagers to any node type.

Code

function flippy_node_view($node, $view_mode = 'full') {

  // Only add the pager if it should be used for this node's content type.
  if (_flippy_use_pager($node)) {
    $node->content['flippy_pager'] = array(
      '#theme' => 'flippy',
      '#list' => flippy_build_list($node),
    );

    // Add the previous/next elements to the page head, if enable for this
    // content type.
    _flippy_add_head_elements($node);
  }
}