Category Archives: Drupal

d7-blocks

Implementing Blocks in Drupal 6 and Drupal 7

By | Drupal | No Comments

Drupal 6: Blocks are implemented using hook_block passing the $op parameter which can have four possible values viz. ‘list‘: A list of all blocks defined by the module. ‘configure‘: Configuration form for the block. ‘save‘: Save the configuration options. ‘view‘: Process the block when enabled in a region in order to view its contents. <?php //Drupal 6 /** * Implementation of hook_block(). */ function newblock_block($op = ‘list’, $delta = 0, $edit = array()) { switch ($op) { case ‘list’: $blocks[0][‘info’] = t(‘A listing of all of the enabled modules.’); $blocks[0][‘cache’] = BLOCK_NO_CACHE; return $blocks; case ‘view’: $list = module_list(); $content…

Read More
CLICK HERE FOR CONTACT US WITH ANY QUESTIONS CONTACT US