Drupal 7 Block_hook 僅實現兩個 hook 就可輕易完成自己的 block
function MOUULENAME_block_info() { $blocks = array(); $blocks['key_name'] = array( // key_name block 識別名稱 'info'=> t('Webmaster_Menu block') ); // ...其他block return $blocks; } function MOUULENAME_block_view($delta) { $blocks = array(); switch($delta) { case 'key_name': $blocks['subject'] = t('Recent webmaster_menu'); $blocks['content'] = '放置呈現的內容'; break; // ...其他block } return $blocks; }