Can we programmatically set the value of a block in drupal?? We could do that via the admin section, but I am looking to see if there is a way, where we could programmatically say that
if($block=="sidebar") {
// do this
}
I could then put this in a preprocess node hook or in a block hook.
Have you tried using hook_block() and setting ($op = "view") ?!
More info here: http://api.drupal.org/api/drupal/developer%21hooks%21core.php/function/hook_block/6