Hello
I use Quick Tabs 3.4
Need to reference the tab was like:
<a href=""> <span> link text </ span> </ a>
Can you please tell how to implement.

Thank you all in advance for the help.

Comments

dkh’s picture

Issue summary: View changes

Here is how I added a span within an accordion tab title link. Within the span is an image that I pull from an associated bean's image field.

<?php

/**
* Theme function to output markup for the accordion style.
*
* @ingroup themeable
*/
function custom_qt_accordion($variables) {
$element = $variables['element'];
$output = '

';
foreach ($element['divs'] as $div) {
$elem = reset($div['content']);
$bean_elem = reset($elem['bean']);
if (isset($bean_elem['field_country_region_image']['#items']['0'])) {
$image = $bean_elem['field_country_region_image']['#items']['0'];
$img_url = $image['uri'];
$image_for_sizing = image_style_path('quicktab_icon', $img_url);
$image_dimensions = getimagesize($image_for_sizing);
$name = strip_tags($div['#prefix']);
$new_prefix = "

$name";
$new_prefix .= "";
$new_prefix .= "Only local images are allowed. $new_prefix .= "src=\"" . image_style_url("quicktab_icon", $img_url) . "\" ";
$new_prefix .= $image_dimensions[3];
$new_prefix .= " alt=\"" . $image['alt'] . "\"";
$new_prefix .= " title=\"" . $image['title'] . "\" />";
$new_prefix .= "

";
$div['#prefix'] = $new_prefix;
}
$output .= drupal_render($div);
}

$output .= '

';
return $output;
}

madan879’s picture

Assigned: Unassigned » madan879
vpshah86’s picture

Assigned: madan879 » vpshah86
smustgrave’s picture

With D7 EOL approaching in a month I'm starting to triage the D7 side of quicktabs queue.

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

smustgrave’s picture

Status: Active » Closed (outdated)