Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
Hi there,
you can just style it like you would any other elements on your page - add css rules in the style.css of your theme for e.g. .quicktabs_wrapper ul.quicktabs_tabs li
There isn't a theme function as such - the reason being that if people overrode the theme and changed the mark-up, the jQuery might no longer work. However I'm thinking of changing this in the future and adding a theme function so that people can add their own classes etc.
However I'm thinking of changing this in the future and adding a theme function so that people can add their own classes etc.
I like this idea. For my implementation of quick tabs, I don't need to add classes, but I need to add additional div tags with classes, so that we can provide custom background images to make the quicktabs_main div appears to have rounded corners with a shadow. If there was a theme override function, we wouldn't have to hack the module to do this.
Hi Alex,
actually I have added the theme function for the tabs themselves, i.e. the ul part of the mark-up. However, adding a theme function to the rest of the mark-up is slightly more complicated. If you want to have a go at a patch I'll see if it makes sense. My concern with adding extra divs is that this could mess up the jquery but if you're already doing it and it's working fine without changing the jQuery selectors then maybe this would be a good idea.
Hi Katherine,
I don't have the ability to modify quicktabs_block() to make it into a theme function, unfortunately. One idea, though, and this would be more limited (though would allow me to achieve what I'm doing without hacking the module), is adding a setting in the admin page, just a checkbox, for whether the user wants an additional header and footer div above and below the quicktabs_main div.
That would be easier to code, I imagine, and would do the trick for me, but might be too rigid to make sense to put in the module for all to use.
Once we get our implementation of Quick Tabs up and running on our site, I'll post a link so you can see what I'm trying to do with the CSS and rounded corners.
The quicktab_block can be themed as any other block in Drupal.
Different class for each tab will not be supported by the module. The tabs are styled with theme_quicktabs_tabs() function, you can override that function in your theme's template.php file like yourthemename_quicktabs_tabs(), and you can add additional classes if you feel so..
The tab pages can be themed as the content (node, block or view) can be themed. Just use the same theming options as it would not be inside quicktabs..
New tabstyles can be added by using the quicktabs_tabstyles hook. It must return an array of 'css file path' => 'style name'.
I don't see any other theming option needed for quicktabs.
Comments
Comment #1
katbailey commentedHi there,
you can just style it like you would any other elements on your page - add css rules in the style.css of your theme for e.g. .quicktabs_wrapper ul.quicktabs_tabs li
There isn't a theme function as such - the reason being that if people overrode the theme and changed the mark-up, the jQuery might no longer work. However I'm thinking of changing this in the future and adding a theme function so that people can add their own classes etc.
Katherine
Comment #2
chandrabhan commentedThanks. I have very little knowledge of css, but I will give it a shot.
Comment #3
darkcss commentedWhat if you wanted to style each tab? I noticed that they aren't classed, only list items. Is there a patch for this?
Comment #4
onejam commentedThat's a good question, it would be nice to have a unique class for each tab so that each tab can have a different background image if desired.
Comment #5
akahn commentedI like this idea. For my implementation of quick tabs, I don't need to add classes, but I need to add additional
divtags with classes, so that we can provide custom background images to make thequicktabs_maindiv appears to have rounded corners with a shadow. If there was a theme override function, we wouldn't have to hack the module to do this.Alex
Comment #6
katbailey commentedHi Alex,
actually I have added the theme function for the tabs themselves, i.e. the ul part of the mark-up. However, adding a theme function to the rest of the mark-up is slightly more complicated. If you want to have a go at a patch I'll see if it makes sense. My concern with adding extra divs is that this could mess up the jquery but if you're already doing it and it's working fine without changing the jQuery selectors then maybe this would be a good idea.
regards,
Katherine
Comment #7
katbailey commentedOpening the issue again in case a patch is forthcoming ;-)
Comment #8
akahn commentedHi Katherine,
I don't have the ability to modify quicktabs_block() to make it into a theme function, unfortunately. One idea, though, and this would be more limited (though would allow me to achieve what I'm doing without hacking the module), is adding a setting in the admin page, just a checkbox, for whether the user wants an additional header and footer div above and below the quicktabs_main div.
That would be easier to code, I imagine, and would do the trick for me, but might be too rigid to make sense to put in the module for all to use.
Once we get our implementation of Quick Tabs up and running on our site, I'll post a link so you can see what I'm trying to do with the CSS and rounded corners.
Alex
Comment #9
pasqualleThe quicktab_block can be themed as any other block in Drupal.
Different class for each tab will not be supported by the module. The tabs are styled with theme_quicktabs_tabs() function, you can override that function in your theme's template.php file like yourthemename_quicktabs_tabs(), and you can add additional classes if you feel so..
The tab pages can be themed as the content (node, block or view) can be themed. Just use the same theming options as it would not be inside quicktabs..
New tabstyles can be added by using the quicktabs_tabstyles hook. It must return an array of 'css file path' => 'style name'.
I don't see any other theming option needed for quicktabs.
Comment #10
pasqualleThe issue is without response and this should not be a problem in the latest release. Closing..
Feel free to reopen the issue if the problem still exists.