Change the content of a node programmatically with hook_node_view I need to append some text programmatically before the text on the home page. But when I use hook_node_view(), I can't seem to do this with the following:

function general_node_view(&amp;$node, $view_mode, $langcode) {
    if ($node-&gt;nid == 1) { 
      //echo '&lt;pre&gt;' . print_r($node-&gt;body['und'][0]['value'],1) . '&lt;/pre&gt;';
      $node-&gt;body['und'][0]['value'] = 'fdsf' .  $node-&gt;body['und'][0]['value'];
   }
 }


Am I going about this the wrong way?
If you are trying for home page then your node should be set as front page content. Otherwise this hook would not do any thing for your home page.

However any node view can be expanded by this hook:

$node-&gt;content['additional-text'] = array(
   '#markup' =&gt; 'TEXT TO GO BEFORE NODE VIEW',
   '#weight' =&gt; -10, // Set as lower as to bring this markup upper
);