4
votes

I've set up taxonomy in Drupal 7 called Colours. I've added some terms (red, blue etc) and added a colour image to each term.

In a content type I have added a term reference field, so my client can choose colours (the colours in which that product is available).

In Views, rather than listing the taxonomy terms on the node page, I would like instead to output the image associated with the taxonomy term.

Any ideas on how to do this? I've tried endless "output this field as" in Views but just can't get it to work. The only way I've actually got it to work is to upload images when adding content, but that's not ideal obviously.

3

3 Answers

1
votes

In Drupal 7 you have to add the taxonomy under "relationships". Then the taxonomy images will appear as fields in the view.

1
votes

I had the same issue, all I did was adding a new field called "image" to the taxonomy and inside the view I just called that field. its working well.

0
votes

Your best bet is to create a View Template, and in the template you can look at the value in that field and load the appropriate image in its place.

Here's a guide on doing this in Views 2: http://www.group42.ca/theming_views_2_the_basics

Couldn't find one for Views 3