I would accomplish this using the same task that zen uses.
function mytheme_preprocess_node(&$variables, $hook) {
// Optionally, run node-specific preprocess functions, like
// mytheme_preprocess_node_1().
$function = __FUNCTION__ . '_' . $variables['node']->nid;
if (function_exists($function)) {
$function($variables, $hook);
}
}
Thanks to the if (function_exists($function))
bit you can simply implement a function for whichever specific nids you wish and it will find and execute them. Just make sure that you pass in the &$variables
parameter as a reference (with the &
) or else none of your changes will find their way out of the function.