override variable in template.php with variable from module_preproccess_node I create custom template for node, and put variable in template.php

$colors = array('black', 'white');
$variables['group']['color'] = $colors;
$variables['size'] = 'double';


then i also create module and want to do hook to node template.

mymodule_preproccess_node() {
$colors = array('blue', 'red', 'green');
$variables['group']['color'] = $colors;
$variables['size'] = 'regular';
}


i want to show in my result:

//colors are blue, red, green instead of black, white
foreach ($group['color'] as $color) {
print $color.', ';
}
//and size is regular instead of double
print $size;


am i right? i want to override variables in template.php with variables from my module. then if i disable my module color will back from template.php.
If I am understanding/reverse engineering your question correctly, in your module, you can do something like this:

function YOURMODULE_preprocess_node(&amp;$variables) {

  if ( // whatever logic ) {

    $colors = array('blue', 'red', 'green');
    $variables['group']['color'] = $colors;
    $variables['size'] = 'regular';

  }

}


This will create variables that can be accessed inside node.tpl.php and its variants.

In template.php you can then do something like this:

function YOURTHEME_preprocess_node(&amp;$variables) {

  if (!isset($variables['size'])) {
    $variables['size'] = 'double';
  }

  if (!isset($variables['group']['color'])) {
    $colors = array('black', 'white');
    $variables['group']['color'] = $colors;
  }

}


which will set them to your defaults if they haven't already been set.

Then you can do whatever you want with them in node.tpl.php.