You are here

function sheetnode_view in Sheetnode 6

Same name and namespace in other branches
  1. 5 sheetnode.module \sheetnode_view()
  2. 7.2 sheetnode.module \sheetnode_view()
  3. 7 sheetnode.module \sheetnode_view()

Implementation of hook_view().

File

./sheetnode.module, line 67

Code

function sheetnode_view($node, $teaser = FALSE, $page = FALSE) {
  $node = node_prepare($node, $teaser);

  // SocialCalc sheet.
  if (!$teaser) {
    $output = _sheetnode_inject('sheetnode-' . $node->nid, 'sheetnode', $node->sheetnode['value'], FALSE, array(
      'entity-type' => 'node',
      'oid' => $node->nid,
    ));
    $node->content['sheetnode'] = array(
      '#value' => $output,
      '#weight' => -1,
    );
  }
  return $node;
}