node_page_view

Versions
mediamosa-21
node_page_view($node)

Menu callback; view a single node.

Code

modules/node/node.module, line 2405

<?php
function node_page_view($node) {
  drupal_set_title($node->title);
  // Set the node path as the canonical URL to prevent duplicate content.
  drupal_add_html_head_link(array('rel' => 'canonical', 'href' => url('node/' . $node->nid)), TRUE);
  // Set the non-aliased path as a default shortlink.
  drupal_add_html_head_link(array('rel' => 'shortlink', 'href' => url('node/' . $node->nid, array('alias' => TRUE))), TRUE);
  return node_show($node);
}
?>