I'm rendering a field from a taxonomy term in node.tpl.php

    if($term = taxonomy_term_load($node->field_test['und'][0]['tid'])) {
              $image_field = field_view_field('taxonomy_term', $term, 'field_image');
              print render($image_field);

But the problem is that above code doesn't apply style to image (from "manage display" tab of term). I discovered how to do it - by adding an empty string as additional parameter to field_view_field - then automagically style will start to apply to rendered content, but the question is - is it normal? This look very strange as I thought that style should be applied by default and it looks kinda buggy.


Peppigno’s picture

I added a fourth argument 'image' for the field_view_field:

$image_field = field_view_field('taxonomy_term',$term,'field_image','image');

It render only the image as you specified for the field cck, even you hidden the label and description.

Jason Dean’s picture

Worked great for me - thanks!