The way this module implements Drupal's render arrays means that it is very difficult to theme. For example, I need to add a CSS class or two and remove some classes from various elements that Quicktabs provides. Unfortunately this simply isn't possible cleanly, because Quicktabs is doing things such as:

'#prefix' => '<div id="quicktabs-container-' . $qt_name .'" class="quicktabs_main quicktabs-style-' . drupal_html_class($settings['style']) .'">',

Hardcoding all this HTML into a #prefix is not how render arrays should really be used, as it gives the theme layer absolutely no ability to modify either the tag (in this case a DIV) or the CSS ID or class (other than completely overriding the various theme functions, or PHP string replace-ing).

Another example:

'class' => 'quicktabs-wrapper quicktabs-style-' . drupal_html_class($settings['style']),

Sending classes into a render array would be much better done as follows:

'class' => array(
    'clearfix', 'my-class', 'another-class',
),

Doing so would thus allow themers to modify these classes cleanly.

Comments

sonictruth’s picture

Jeff is 100% right—I've had issues with this before trying to adjust QT output. With the current set up we have to resort to hacks or overriding theme functions which really is a last resort with D7.

smustgrave’s picture

Status: Active » Closed (outdated)

With D7 EOL approaching in a month I'm starting to triage the D7 side of quicktabs queue. This doesn't appear to have any code so believe this may not make it, sorry! Thanks though!

If still an issue or needed for 4.0.x (latest branch) feel free to reopen