1

What I need to do is merge the usermenu ( user tasks ) with a Quicktabs menu I have on the same page.

So what I'm trying to do at the minute is to programmatically build a Quicktabs instance.

Based on the infomation at https://www.drupal.org/node/2119625 I have created a module 'userquicktabs' heres the .module . Ive enabled the module, and I take it after this I should be able to see a new instance with the others instances I've created in the Quicktabs UI. Do I need to make a block for the instance?

<?php


function userquicktabs() {
$tabs = array(
$tabs[] = array(
  'title'   => t('Node 1'),
  'type'    => 'node',
  'nid'     => '1',
  'weight'  => 0,
),
$tabs[] = array(
  'title'   => t('Node 2'),
  'type'    => 'node',
  'nid'     => '2',
  'weight'  => 1,
),
);

 // Configure the QuickTabs options
 $quicktabs_options = array(
'style'   => 'commons',
'ajax'    => FALSE,
'renderer'    => 'quicktabs',
);

$quicktabs_name = 'newinstance';

 print drupal_render(quicktabs_build_quicktabs($quicktabs_name, $quicktabs_options, $tabs));

}
0

Yes, programmatically created instances are not registered with those created trough the UI, but at least they are more flexible.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.