node_show
- Versions
- 4.6 – 5
node_show($node, $cid)- 6
node_show($node,$cid, $message = FALSE)- 7
node_show($node, $message = FALSE)
Generate an array which displays a node detail page.
Parameters
$node A node object.
$message A flag which sets a page title relevant to the revision being viewed.
Return value
A $page element suitable for use by drupal_page_render().
Code
modules/node/node.module, line 1291
<?php
function node_show($node, $message = FALSE) {
if ($message) {
drupal_set_title(t('Revision of %title from %date', array('%title' => $node->title[FIELD_LANGUAGE_NONE][0]['value'], '%date' => format_date($node->revision_timestamp))), PASS_THROUGH);
}
// Update the history table, stating that this user viewed this node.
node_tag_new($node->nid);
// For markup consistency with other pages, use node_build_multiple() rather than node_build().
return node_build_multiple(array($node->nid => $node), 'full');
}
?>Login or register to post comments 