Installed this module to have a try, but how to display taxonomy images?

This instruction below can be found from readmy.txt

To display a taxonomy image from your theme or other php code, add
a call to taxonomy_image_display(). This function requires that you pass
in the term id of the term for which you wish to display the appropriate
image. For example:
taxonomy_image_display($term->tid)

but where to add a call to taxonomy_image_display()?

Comments

nancydru’s picture

Assigned: Unassigned » nancydru
Status: Active » Fixed

Try reading the documentation in the handbook and see if it answers your question http://drupal.org/node/101682. If not, re-open this issue.

astra’s picture

Status: Fixed » Closed (fixed)

Yes. Thanks! Taxonomy images can show up now, for example, using Contemplate module to put the code below to teaser or body of nodes:

<?php
foreach (taxonomy_node_get_terms($node->nid) as $term) {
    if ($image = taxonomy_image_display($term->tid, "align='right'")) {
      print "<a href='taxonomy/term/" . $term->tid . "'>" . $image . "</a>";
    }
}
?>
nancydru’s picture

Great!

It is not a problem on this issue, but in the future, please don't mark an issue closed, especially if a patch is involved. The system automatically marks them closed after two weeks and notifies me. For some things, I do some follow up actions at that point, such as creating a new "official" release.