Skip to content

Block api

Sébastien LUCAS edited this page Jul 10, 2013 · 2 revisions

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;
}

WIKI by Sébastien Lucas CEO & Funder or Bricks

Clone this wiki locally