How do I overwrite node title for specific content type? I'm trying to add a chapter tag (§) in front of a title for content type 'ABC' in a Drupal 7 site.

I tried the following:

function mytheme_preprocess_node(&amp;$variables) {
  if ($variables['view_mode'] == 'full' &amp;&amp; node_is_page($variables['node'])) {
    $variables['classes_array'][] = 'node-full';
  }
  //watchdog("mytheme_preprocess_node", 'items %items', array('%items' =&gt; print_r($variables['node'], true)));
  $node = $variables['node'];
  if ($node-&gt;type=='abc') {
    $node-&gt;title = 'this is a test' . $node-&gt;title; 
    $variables['node'] = $node;
    watchdog("mytheme", 'items %items', array('%items' =&gt; print_r($variables['node'], true)));
  }
}


I did see the message output in the log, however updated title is not showing up on the site.
Every implementation of hook_preprocess_node() made from a module (or a theme) is executed after template_preprocess_node(), which contains the following code:

  $variables['node_url']  = url($uri['path'], $uri['options']);
  $variables['title']     = check_plain($node-&gt;title);
  $variables['page']      = $variables['view_mode'] == 'full' &amp;&amp; node_is_page($node);


template_preprocess_node() is the preprocess function executed from the Node module, which is the module that defines theme_node().

The template file is then using $title for the page title.

  &lt;?php print render($title_prefix); ?&gt;
  &lt;?php if (!$page): ?&gt;
    &lt;h2&lt;?php print $title_attributes; ?&gt;&gt;
      &lt;a href="&lt;?php print $node_url; ?&gt;"&gt;&lt;?php print $title; ?&gt;&lt;/a&gt;
    &lt;/h2&gt;
  &lt;?php endif; ?&gt;
  &lt;?php print render($title_suffix); ?&gt;


If you want to change the value for title, you should change the value of $title, in your preprocess function.

The execution order of preprocess functions is explained in the documentation for theme(). In that documentation "HOOK" is a placeholder for the type of the preprocess function, e.g. "node," "html," and "page."
Between the rendering engine used for the theme, a module, and the currently set theme, the preprocess function implemented from the theme is the last one to be called. This helps if there is another module that alters the title, and you want to use the one set from the theme.

What I reported is also valid for Drupal 6.