Pass taxonomy terms from node to block just wanted to scope peoples thoughts on the best way to do this: I have a node which surfaces taxonomy terms. I need to pass them to a custom block (templated with block.tpl.php).

The terms can be see within the node using devel, but i'm unclear as to how best pass them into the custom block.

any thoughts would be greatly appreciated
/**
 * Override or insert variables into the block templates.
 *
 * @param $variables
 *   An array of variables to pass to the theme template.
 * @param $hook
 *   The name of the template being rendered ("block" in this case.)
 */

function MYTHEME_preprocess_block(&amp;$variables) {

  if ($variables['block_id'] == 'target_block_id') {

    //load node object
    $node = menu_get_object();

    // do something with node object

    // add variable to your block template file
    $variables['block_variable'] = 'something';
  }
}


Available block variables - Block variables