I am working on a simple module that builds a block containing a tabbed box with 4 areas in it. I thought I could then add new block regions to each of those areas. WRONG!

So, my question is how can you build a block and inside that block call other blocks? The idea is I can have a chunk of blocks with additional info that can be turned on and off using the blocks maintenance user interface.

I have been themeing Drupal for a while and I am comfortable with developing modules. My tabbedlink.module code is pasted below:


// Other module code above including hook_block removed for post

case 'view':
		
		$tab_label = variable_get('tabbed_feeds_label','tab name');
		$tabbed_link_content = '<div id="'.$tab_label.'">';
		if ($tab1){
  				$tabbed_link_content .= '<div id="tab1" class="region">'.$tab1.'</div>';
  		}
		$tabbed_link_content .= '</div>';
		$block['content'] = $tabbed_link_content;
		return $block;

My theme.info file includes:


regions[tab1]= Tab 1

I can add the 'if' statement to my page.tpl.php and the block region returns the content fine.

Any thoughts on this?

Comments

nevets’s picture

Have you looked at the panels module and mini panels?

jjmulletman’s picture

I saw these earlier, but the developer recommends:

Drupal 6: Alpha stage. Code is working but unstable, and should NOT be run on production sites.

I am playing with it now and it looks like a direction I can go.

Has anyone had bad experiences with it?