Altering the Title of node using Preprocess I am trying to alter the page title of history content type using this function

function mytheme_preprocess_page(&amp;$variables) {
   if(isset($variables['node']) &amp;&amp; $variables['node']-&gt;type == "your_content_type") {
   drupal_set_title("my_title");    
 }
}


But you know what, I dont get anything in node array.
You could use hook_node_view, which also gives you more flexibility, (e.g. control what view mode / language you affect):

function MY_MODULE_node_view($node, $view_mode, $langcode) {
  if ($node-&gt;type == 'your-node-type' &amp;&amp; $view_mode == 'full') {
    drupal_set_title('your-title');
}


Instead of using a preprocess function, which is better for template changes, (for example, adding variables to it):


  The main role of the preprocessors is to set up variables to be placed
  within the template (.tpl.php) files.


Preprocess and process functions