| 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.
developer/
<?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;
}
?>