Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

is it possible to create new tabs and place them under quick tabs, i.e, i want to create two new quick tabs and add them under (nesting structure) already existing three quick tabs...How can i achieve this

share|improve this question
1  
quicktabs uses blockes in tabs. use quicktab block in quicktabs –  monymirza Jan 31 '13 at 7:11
    
hi...can you be a little more specific –  kewal Jan 31 '13 at 7:21
    
@kewal, none of the two answers did work for you? –  Sithu Feb 4 '13 at 6:22
    
they did...thanks..i accepted them... –  kewal Feb 4 '13 at 6:31
    
What was the real problem ? did you reinstalled quicktabs module ? –  jramby Feb 4 '13 at 12:12
add comment

2 Answers

up vote 0 down vote accepted

I'm not sure how nested tabs can be created from QuickTabs admin UI. But I believe you can render the child tabs programmatically. The below is how to render a quicktab.

<?php
if(module_exists('quicktabs')) {
    $tabs = quicktabs_build_quicktabs('child_tabs'); // where 'child_tabs' is your quicktabs machine name
    print render($tabs);
}
?>

You can add such kind of code snippet into your view/block of a particular parent tab.

Let's say for example, you have a parent tab "Parent Tab 1" which is assigned to a block created from admin/structure/block/add. You could add the above code snippet into the block body.

If you enable the "PHP Filter" module, you can embed any PHP code into the block body when you select "PHP Filter" text format.

Then, when you access the "Parent Tab 1", you will see another quicktabs inside which is printed programamtically.

share|improve this answer
    
hi...where should i add the code..in which file –  kewal Jan 31 '13 at 7:27
    
@kewal, see my updated answer. –  Sithu Jan 31 '13 at 9:00
    
thanks a ton... –  kewal Jan 31 '13 at 10:03
add comment

If I understand your request well, I think this is the solution supplied by @monymirza. But in the latest stable version of quicktabs you have the possibility to select quicktabs to be show under a tab.

Checkout this image to see : (ab is a quicktab instance that has been created earlier, and c is the parent tab that will contain ab)

Quicktabs under quicktabs

share|improve this answer
    
hi @jramby ...where can i get to know my already created quick tab instances... –  kewal Jan 31 '13 at 9:53
    
normally, once you selected qtabs in the radio button, Quicktabs instance shows automatically in Quicktabs instance... if not, clear your cache. –  jramby Jan 31 '13 at 9:57
    
yes..i already have tried that...not working... –  kewal Jan 31 '13 at 10:03
    
Is your qtab instace listed on the page: admin/structure/quicktabs ? –  jramby Jan 31 '13 at 10:08
    
yes it is...m really not getting why the instance is not showing –  kewal Jan 31 '13 at 10:17
show 3 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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