Skip to content

Latest commit

 

History

History
22 lines (20 loc) · 649 Bytes

Block-api.md

File metadata and controls

22 lines (20 loc) · 649 Bytes

In d6 there was only hook_block with different op

In d7, there is a hook by operation like

function mymodule_block_info() {
    $blocks['block1'] = array(
        'info' => t('My new block'),
        'cache' => DRUPAL_CACHE_PER_PAGE,
        'region' => 'sidebar_first',
        'status' => 1,
    );
    return $blocks;
}