All pastes #493037 Raw Edit

tonkeht

public text v1 · immutable
·published 2007-05-17 15:46 UTC
rendered paste body
tabs_load();


function print_tabs($region) {
  $tabs = array();
  $regions = gmn_regions();
  if (!in_array($region, $regions)) {
  }
  $region_blocks = block_list($region);

//  print_r($region_blocks);
  $tabs[$region] = array(
    '#type' => 'tabset',
  );

  $i = 1;
  foreach ($region_blocks as $region_block) {
    $tabs[$region]['tab' . $i] = array (
      '#type'  => 'tabpage',
      '#title' => t($region_block->title),
      '#content' => $region_block->content,
    );
    $i++;
  }

  if ($region_block) {
      return tabs_render($tabs);
  } else {
    return NULL;
  }
  //return $tabs;
}