node_show

modules/node/node.module, line 817

Versions
4.6 – 5
node_show($node, $cid)
6
node_show($node, $cid, $message = FALSE)
7
node_show($node, $message = FALSE)

Generate a page displaying a single node, along with its comments.

▾ 3 functions call node_show()

node_page_view in modules/node/node.module
Menu callback; view a single node.
node_revisions in modules/node/node.module
Menu callback for revisions related activities.
poll_results in modules/poll/poll.module
Callback for the 'results' tab for polls you can vote on

Code

<?php
function node_show($node, $cid) {
  $output = node_view($node, FALSE, TRUE);

  if (function_exists('comment_render') && $node->comment) {
    $output .= comment_render($node, $cid);
  }

  // Update the history table, stating that this user viewed this node.
  node_tag_new($node->nid);

  return $output;
}
?>
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.