I have a module of type block.Now based on the user i want to display different blocks . So i have a written the module but my dilemma is if its possible to call a block(default) inside our custom block? Here's my code m trying !
<?php
/**
* Implements hook_block_info().
*/
function sample_module_block_info() {
$blocks['current_posts'] = array(
'info' => t('Current Users Of the Drupal Website'), //The name that will appear in the block list.
'cache' => DRUPAL_CACHE_PER_ROLE, //Default
);
return $blocks;
}
function sample_module_block_view($delta = '')
{
$block = array();
global $user;
switch ($delta) {
case 'current_posts':
$block['subject'] = t('Logged in User Currently');
$block['content']=$user->name;
break;
/**
switch ($delta) {
case 'current_posts':
global $user;
print "The current user is: ";
print $user->name;
if($user->name == "admin")
print " This Shit Works ";
*/
}
return $block;
}
?>
Now in block['content'] i want to display another block! Can somebody lead me to how to do this ? If possible ?