node_example_view

  1. drupal
    1. 4.7
    2. 5
    3. 6 node_example.module
Versions
4.7 node_example_view(&$node, $teaser = FALSE, $page = FALSE)
5 – 6 node_example_view($node, $teaser = FALSE, $page = FALSE)

Implementation of hook_view().

This is a typical implementation that simply runs the node text through the output filters.

Code

developer/examples/node_example.module, line 223

<?php
function node_example_view($node, $teaser = FALSE, $page = FALSE) {
  $node = node_prepare($node, $teaser);
  $node->content['myfield'] = array(
    '#value' => theme('node_example_order_info', $node), 
    '#weight' => 1,
  );

  return $node;
}
?>