Return to Snippet

Revision: 22443
at January 12, 2010 17:23 by michamilz


Initial Code
function wim_preprocess_node(&$variables) { 
  $function = 'wim_preprocess_node'.'_'. $variables['node']->type; 
  if (function_exists($function)) { 
    $function(&$variables, $hook); 
  } 
} 

Each nodetype gets its own preprocess_node function like this, so the code can be a bit cleaner.

Initial URL
http://blogthingee.com/blog/too-much-more-power-your-nodetpl

Initial Description


Initial Title
more power from node.tpl

Initial Tags
drupal

Initial Language
PHP