Prorgrammatically generated quicktab does not display content I have programmatically created a quicktab but the contents of the tab do not display. I have followed the instructions and have looked at this related question but it does not work for me. I suspect I must be missing something simple. Here is the code for creating the quicktab:

function create_quicktabs() {

  $block_ids = array(
    'Books &amp; Journals' =&gt; 'books_journals_search',
    'Articles' =&gt; 'articles_search',
    'Archives' =&gt; 'archives_search',
    'Databases' =&gt; 'databases_search',
    'Course Reserves' =&gt; 'course_reserves_search',
    'Institution Repository' =&gt; 'repository_search',
  );

  $tabs = array();
  foreach ($block_ids as $title =&gt; $block_delta) {
    $block = block_load('catalogue_search', $block_delta);
    $tabs[] = array(
      'title' =&gt; t($title),
      'type' =&gt; 'block',
      'bid' =&gt; $block-&gt;bid,
      'hide_title' =&gt; TRUE,
    );
  }

  // Configure the QuickTabs options
  $quicktabs_options = array(
    'style' =&gt; 'Bullets',
    'ajax' =&gt; FALSE,
    'sorted' =&gt; FALSE,
  );

  $quicktabs_name = 'catalogue_search';
  $quicktabs = quicktabs_build_quicktabs($quicktabs_name, $quicktabs_options, $tabs);
  return $quicktabs;
}


I get no errors when this is run, but it seems as though quicktabs can't find the block to display. I have verified that the blocks do exist and the block ids are valid. I have also tried using block_delta for the bid value - again same result. This is for Drupal 7 by the way. What am I doing wrong?
I have found the solution to the problem through some experimentation. It appears that the value for bid must take the form of: module_name_delta_block_delta. To illustrate this, here is an example:

$tabs[] = array(
  'title' =&gt; t($title),
  'type' =&gt; 'block',
  'bid' =&gt; 'catalogue_search_delta_books_journals_search',
  'hide_title' =&gt; TRUE,
);


The module name is: catalogue_search.
Then you need the text: delta
Finally the block delta name: books_journals_search.

I did not see this documented anywhere so hopefully this will help others with the same problem.