I have a created a block using UI .I want to change the content of the block programmatically. For this I am using hook_block_view_alter(&$data, $block) for it as follows: I have just created a block using UI and I am going to assign certain pages which will be able to see that view..
function hook_block_view_alter(&$data, $block) {
if ($block->delta == 'HOW CAN I GET THE $DELTA here') {
$data['#markup'] = '<a href="www.google.com">Google</a>';
}
}
$block->module == 'block'
so you don't get collisions with other modules. But really, implementinghook_block_info()
andhook_block_view()
yourself would be a much more reusable solution