preprocess

Make changes to node view by preprocess node

Make changes on node by hook preprocess node

<?php
function [mymoduel]_preprocess_node(&$variables) {
 
$node = $variables['node'];
  if (
module_exists('taxonomy')) {
   
$variables['taxonomy'] = taxonomy_link('taxonomy terms', $node);
  }

  ...
 
$variables['content'] = $node->teaser;
  ...
 
// Clean up name so there are no underscores.
 
$variables['template_files'][] = 'node-' . $node->type;
?>

Make changes to page with preprocess page in module

This is how you can make changes to a page view with preprocess page hook from your module

<?php
function support_bulk_preprocess_page(&$variables) {

//Print out to see all variables
 
?>

  <pre>
  <?php
      print_r
($variables);
 
?>

  </pre>
  <?php
 
exit;

  if (
$variables['node'] && arg(2) != 'edit') {
    
$variables['template_files'][] = 'page-'. $variables['node']->type;
  }


  if (
$variables['node']) {
    
$variables['body_classes'][] = 'page-'. $variables['node']->type;
  }

}
?>