Modify existing block programmatically by block id I have a block with the id 'block-block-8'. In my template.php I would like to have a function that changes that block's content so I am able to add a dynamic "back to category link" (category needs to come frome the url) on my products page back to the category page.

Something like this:

function ga2012_block_view($delta = '') {
  $block = array();
  switch ($delta) {
    case 'block-block-8':
      $block = array(
        'content' =&gt; '&lt;a href="/order/4/workshops"&gt;Back to $_GET["category"]&lt;/a&gt;',
      );
      break;
  }

  return $block;
}


Does someone has a working implementation of this code? Please ask me questions if I haven't been clear enough, thanks!
You might try with hook_block_view_MODULE_DELTA_alter which:


  Performs alterations to a specific block