node_build_content

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

modules/node/node.module, строка 1063

Версии
5 – 6
node_build_content($node, $teaser = FALSE, $page = FALSE)

Builds a structured array representing the node's content.

Параметры

$node A node object.

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

$page Определяет, отображается ли сама страница ноды, или же нода выводится в другом месте.

Возвращаемое значение

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

▾ 5 функции вызывают node_build_content()

book_node_export in modules/book/book.module
Generates printer-friendly HTML for a node. See alsobook_export_traverse()
hook_search in developer/hooks/core.php
Определяет пользовательскую функцию поиска.
node_search in modules/node/node.module
Реализация hook_search().
node_view in modules/node/node.module
Генерирует вывод ноды.
_node_index_node in modules/node/node.module
Индексирует одну ноду.

Код

<?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;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему