• Avail guidance to develop Drupal modules & Drupal themes
  • Share and get review of your code
  • Get Access to free CodeBooks and ThemeBooks
  • Drupal 5, 6 and 7 covered

Dernières Petites Annonces

hook_block

Drupal hook: hook_block

2
0

Blocks are the one of the basic and most fascinating features of Drupal. With block you can display information in the form of block by saving and utilizing the screen area. Here is an example of implementation of hook_block

<?php
/**
* Implementation of hook_block
*
* @param $op
* @param $delta
* @param $edit
* @return $block
* @author Drupal Developer
*/
function browse_info_block($op = 'list', $delta = 0, $edit = array()) {
switch ($op) {
case 'list':
$blocks[1] = array(
'info' => t("Browse information by category"),
'status' => 1,
'region' => 'content',
'weight' => 0,
);

return $blocks;
case 'configure':
$am__vocabulary = _get_vocabulary();
$am__imagecache = _get_imagecache();

Syndiquer le contenu

Sitestats

Recent comments

rss-top-right.png
toolbar powered by www.iconcy.com