node_build_content

  1. drupal
    1. drupal6
    2. drupal7
Versionen
drupal6 node_build_content($node, $teaser = FALSE, $page = FALSE)
drupal7 node_build_content($node, $teaser = FALSE)

Builds a structured array representing the node's content.

Übergabeparameter

$node A node object.

$teaser Whether to display the teaser only, as on the main page.

$page Whether the node is being displayed by itself as a page.

Rückgabewert

An structured array containing the individual elements of the node's body.

▾ 5 functions call node_build_content()

book_node_export in modules/book/book.module
Generates printer-friendly HTML for a node.
hook_search in developer-docs/hooks/core.php
Define a custom search routine.
node_search in modules/node/node.module
Implementation of hook_search().
node_view in modules/node/node.module
Generate a display of the given node.
_node_index_node in modules/node/node.module
Index a single node.

Code

modules/node/node.module, line 1075

<?php
function node_build_content($node, $teaser = FALSE, $page = FALSE) {

  // The build mode identifies the target for which the node is built.
  if (!isset($node->build_mode)) {
    $node->build_mode = NODE_BUILD_NORMAL;
  }

  // Remove the delimiter (if any) that separates the teaser from the body.
  $node->body = isset($node->body) ? str_replace('<!--break-->', '', $node->body) : '';

  // The 'view' hook can be implemented to overwrite the default function
  // to display nodes.
  if (node_hook($node, 'view')) {
    $node = node_invoke($node, 'view', $teaser, $page);
  }
  else {
    $node = node_prepare($node, $teaser);
  }

  // Allow modules to make their own additions to the node.
  node_invoke_nodeapi($node, 'view', $teaser, $page);

  return $node;
}
?>

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen