Commit 792d7396 authored by webchick's avatar webchick
Browse files

#737792 by quicksketch, drifter, Mike Wacker, moshe weitzman, sun, dhthwy:...

#737792 by quicksketch, drifter, Mike Wacker, moshe weitzman, sun, dhthwy: Fixed Use a 'title callback' for node/%node instead of drupal_set_title().
parent dd781f99
......@@ -1876,6 +1876,10 @@ function node_menu() {
$items['node/%node'] = array(
'title callback' => 'node_page_title',
'title arguments' => array(1),
// The page callback also invokes drupal_set_title() in case
// the menu router's title is overridden by a menu link.
'page callback' => 'node_page_view',
'page arguments' => array(1),
'access callback' => 'node_access',
......@@ -2502,6 +2506,9 @@ function node_page_default() {
* Menu callback; view a single node.
function node_page_view($node) {
// If there is a menu link to this node, the link becomes the last part
// of the active trail, and the link name becomes the page title.
// Thus, we must explicitly set the page title to be the node title.
$uri = entity_uri('node', $node);
// Set the node path as the canonical URL to prevent duplicate content.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment