Idea and or support and or Feature request.

My site uses free tagging, so that the typical node has 4-7 terms assigned to it. Now, a few of my terms have images, and a few does not. How might I modify taxo-image to display the first available image and not just the 'first come-first serve' style that we work with now?

Example:

term1, term2, term3, term4, term5

term2 has an image, yet because term1 does not... no image.

term 5 also has an image, yet because term2 comes first, display term2 IF not available display term5.

ideas?

Comments

czarphanguye’s picture

Priority: Critical » Minor

Eh, I've noticed that weight kind of get's the job done, yet it's a pain in the arse to sort 500+ free tags and sort them.

nancydru’s picture

Do you mean something like this:

    $termlist = taxonomy_node_get_terms($node->nid);
    $terms = array();

    foreach ($termlist as $key => $term) {
      $taxo_image = taxonomy_image_display($term->tid, "border='0', hspace='5', vspace='5'")
      if ($taxo_image) {
        // Quit when we find the first one
        break;
      }
Bevan’s picture

Category: feature » support
Status: Active » Fixed

@czarphanguye

See my ad hoc documentation for an implementation that you might be able to work with: http://drupal.org/node/152081

Anonymous’s picture

Status: Fixed » Closed (fixed)