diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-08-02 05:29:08 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-08-02 05:29:08 +0000 |
commit | 792d73962e03ec7bbcf9682a8ca7c6f26c65bfd6 (patch) | |
tree | cb5f79292888c001a323310bfd53ded4af3e6069 /modules | |
parent | dd781f99eaf6e1c7bdc2a98f469c8d76961bd6ed (diff) | |
download | brdo-792d73962e03ec7bbcf9682a8ca7c6f26c65bfd6.tar.gz brdo-792d73962e03ec7bbcf9682a8ca7c6f26c65bfd6.tar.bz2 |
#737792 by quicksketch, drifter, Mike Wacker, moshe weitzman, sun, dhthwy: Fixed Use a 'title callback' for node/%node instead of drupal_set_title().
Diffstat (limited to 'modules')
-rw-r--r-- | modules/node/node.module | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/node/node.module b/modules/node/node.module index d74c1ce9e..ec9700c4e 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -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. drupal_set_title($node->title); $uri = entity_uri('node', $node); // Set the node path as the canonical URL to prevent duplicate content. |