我創造了我的Drupal 7的自定義安裝塊這樣的:現在定製塊不顯示
/*
* Implements hook_block_info
* To create a block to display the information for planB in the footer.
*/
function planb_block_info() {
$blocks['planb_footer'] = array(
'info' => t('PlanB Footer'),
'status' => true,
'weight' => 0,
'visibility' => 1,
);
return $blocks;
}
function planb_block_view($delta = '') {
switch($delta) {
case 'planb_footer':
$block['subject'] = NULL;
$block['content'] = footer_block_content($delta);
return $block;
break;
}
}
function footer_block_content($delta) {
return array('#markup' => theme('footer'));
}
,在我的本地測試環境頁腳正確顯示。但是,當我將模塊文件上傳到生產環境時,頁腳不會出現在任何地方。它甚至不出現在Blocks頁面上,就好像掛鉤沒有註冊到Drupal一樣。有人知道我可能忽略了什麼嗎?
我已清除緩存。
它是否顯示在模塊頁面中? – SpaceBeers 2012-02-09 13:45:05
是模塊已啓用,其提供的其他功能正在運行。 – KerrM 2012-02-09 13:55:21
嗯。您的測試和生產環境有什麼不同? – SpaceBeers 2012-02-09 16:09:58