Sorry for my ENGLISH! I am not good at it.
In DRUPAL6 and before, I can add a region in node.tpl.php in this way. (From http://drupal.org/node/208869 )
1.Add code in THEME_NAME.info
regions[REGION_NAME] = REGION_NAME
2.Add funciton in template.php
function THEME_NAME_preprocess_node(&$variables, $hook) {
$variables['REGION_NAME'] = theme('blocks', 'REGION_NAME');
}
3.Add code in node.tpl.php
<?php if ($REGION_NAME) { ?><div class="REGION_NAME"><?php print $REGION_NAME?></div><?php }; ?>
Then, a region named REGION_NAME is added in node in D6
But in DRUPAL7, this way not work. I do a test and see below.
1.Add code in THEME_NAME.info is OK
2.I add these code to test 'THEME_NAME_preprocess_node' funciton
function THEME_NAME_preprocess_node(&$variables, $hook) {
$variables['REGION_NAME'] = t('This is a sentence!');
}
3.Add code in node.tpl.php
<?php print $REGION_NAME >
Finally, I get a 'This is a sentence!' in my node. This result shows the Funciton 'THEME_NAME_preprocess_node' is work fine.
But when I change code in STEP2 to
$variables['REGION_NAME'] = theme('block','REGION_NAME');
It is not work in my DRUPAL7.
I can only think that the usage of theme() is different.