You are here

function content_view in Content Construction Kit (CCK) 6.2

Same name and namespace in other branches
  1. 5 content.module \content_view()
  2. 6.3 content.module \content_view()
  3. 6 content.module \content_view()

Implementation of hook_nodeapi 'view' op.

Generate field render arrays.

1 call to content_view()
content_token_values in includes/content.token.inc

File

./content.module, line 331
Allows administrators to associate custom fields to content types.

Code

function content_view(&$node, $teaser = FALSE, $page = FALSE) {

  // Let field modules sanitize their data for output.
  _content_field_invoke('sanitize', $node, $teaser, $page);

  // Merge fields.
  $additions = _content_field_invoke_default('view', $node, $teaser, $page);
  $old = isset($node->content) ? (array) $node->content : array();
  $node->content = array_merge($old, $additions);
}