Hi, I am not sure how to theme my block. I have chosen "Default (no style)' in the settings.

Comments

katbailey’s picture

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.

Katherine

chandrabhan’s picture

Status: Active » Closed (fixed)

Thanks. I have very little knowledge of css, but I will give it a shot.

darkcss’s picture

What if you wanted to style each tab? I noticed that they aren't classed, only list items. Is there a patch for this?

onejam’s picture

Version: 6.x-2.x-dev » 6.x-1.x-dev

That'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.

akahn’s picture

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.

Alex

katbailey’s picture

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.

regards,
Katherine

katbailey’s picture

Status: Closed (fixed) » Active

Opening the issue again in case a patch is forthcoming ;-)

akahn’s picture

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.

Alex

pasqualle’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev
Status: Active » Postponed (maintainer needs more info)

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.

pasqualle’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

The 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.