Closed (outdated)
Project:
Quick Tabs
Version:
7.x-3.x-dev
Component:
Code
Priority:
Critical
Category:
Task
Assigned:
Reporter:
Created:
13 Dec 2012 at 09:05 UTC
Updated:
16 Dec 2024 at 23:10 UTC
Jump to comment: Most recent
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
Comment #1
dkh commentedHere 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 .= "src=\"" . image_style_url("quicktab_icon", $img_url) . "\" ";
$new_prefix .= "";
$new_prefix .= "
$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;
}
Comment #2
madan879 commentedComment #3
vpshah86 commentedComment #4
smustgrave commentedWith 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
Comment #5
smustgrave commented