Display Taxonomy Field vs Default Taxonomy text w/out New modules I have a node with taxonomy term reference fields. The taxonomy term has an image field. Without installing extra modules (I already have WAY more than I should have) is there a way to display a specific field for the taxonomy instead of the textual? And do it from a Childtheme?

I have the DEVEL module installed and after selecting the specific field I still get no ideas. I have dug around inside the field, looking through the various attributes of that field without any ideas.

Array &gt; 'element' &gt; '#field_name'
Array &gt; 'element' &gt; '#field_type' = 'taxonomy_term_reference'
Array &gt; 'element' &gt; '#items' &gt; 'tid' = 4
Array &gt; 'element' &gt; '#items' &gt; 'taxonomy_term' &gt; Object = Recursion


It feels like I am 'right there' and should be able to grab something like ['element'][0]['field_taxonomy_term_image'] and render, but I can't find anything. I realize, after searching stackexchange, and google, that I could install Views and tweak around with it to get the desired output, but I know I've seen somewhere that you can (without coding) get the output of a taxonomy term to be another field than 'title' but I don't remember where I saw it.

UPDATE: I have found the path, but can't figure out how to output it. I did a DPR versus a KPR and just dug through the text. Here is what I see. Inside of template.php inside of a drupal-based custom function THEMENAME_field__content_type($variables) I dpr'd $variables['element'] and found this object/array/path.

[#object] =&gt; stdClass Object
    [field_faction_affiliation] =&gt; Array
        [und] =&gt; Array
            [0] =&gt; Array
                [taxonomy_term] =&gt; stdClass Object
                    [field_faction_icon'] =&gt; Array
                        ...
                        [uri] =&gt; public://Faction - Jinteki.pnp
                        [filemime] =&gt; image/png
                        ...


So I feel like... I could theoretically, create a new $variables['faction_icon'] to pass on to my tpl.php using the pieces above to generate an img tag. Any ideas?

UPDATE: After a bit more digging around I got this to dpr and output what I expected.

$variables['element']['#object']-&gt;field_faction_affiliation['und'][0]['taxonomy_term']-&gt;field_faction_icon['und'][0]


So... now the tough part is figuring out how to generate an image path from a URI... of which, I am fairly clueless, but I will start searching.

UPDATE: After tweaking the function listed above I get this to work.

$faction_icon_url = file_create_url($variables['element']['#object']-&gt;field_faction_affiliation['und'][0]['taxonomy_term']-&gt;field_faction_icon['und'][0]['uri']);
$output = "&lt;img class='faction_thumb' src='". $faction_icon_url . "' /&gt;";
return $output;


Now I have to figure out how to make this image link back to the taxonomy_term like the original output of text did.
Ok... so following all of the steps above, I was able to cobble together what I wanted.

In template.php I have a custom function:

THEMENAME_field__CONTENT_TYPE($variables)


Inside this function, I check for $variables['element']['#field_name'] in a switch statement. IF the switch statement equals the field that has the taxonomy reference (i.e., 'field_faction_affiliation') then I do the following:

case 'field_faction_affiliation':
    $base_path = base_path();
    $faction_icon_href = $base_path . $variables['element'][0]['#href'];
    $faction_icon_title = $variables['element'][0]['#title'];
    $faction_icon_url = file_create_url($variables['element']['#object']-&gt;field_faction_affiliation['und'][0]['taxonomy_term']-&gt;field_faction_icon['und'][0]['uri']);
    $output = "&lt;a href='$faction_icon_href'&gt;&lt;img alt='$faction_icon_title' class='faction_thumb' src='$faction_icon_url' /&gt;&lt;/a&gt;";
    return $output;
    break;


I'm almost 100% certain that the base_path hobble I did is NOT drupal 'Best Practices' so if anyone has a suggestion for correcting that, please let me know. Otherwise. This is how I got what I wanted.