New Views Field: All Associated Taxonomy Images
Likeless - June 16, 2009 - 14:05
| Project: | Taxonomy Image |
| Version: | 6.x-1.x-dev |
| Component: | Views |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | reviewed & tested by the community |
Jump to:
Description
Views provides a taxonomy field that lists all related taxonomy terms for a node as one field. This is pretty handy. I wanted to do the same with taxonomy image, though.
This patch provides a new field in the Taxonomy group that will list all attached taxonomy images. If a term does not have an attached image, it simply won't be listed, so you can be sure of an images-only output.
I made this patch mainly by copying and hacking a mixture of the existing views files for Taxonomy Image and the relevant files in Views for Taxonomy. One bonus of this is that it has support for filtering results by vocabulary.
| Attachment | Size |
|---|---|
| taxonomy_image_views_list.patch | 1.35 KB |
| views_handler_field_taxonomy_image_list.zip | 1.51 KB |

#1
good
#2
I tried to apply it, but I got this error when configuring the view "Error: handler for term_image > tid_list doesn't exist!".
I patched the file successfully I guess I need to do something for the handler file.
#3
Unzip the file views_handler_field_taxonomy_image_list.zip into your taxonomy_image module directory. I think that's what is missing.
#4
Good, it's working now
#5
I can partly confirm that this works. I will post another issue though which is not related to this one. For some reason every taxonomy image and views combination results in a textual link instead of an image, while on the node display the image is displayed.
So I can confirm that this patch works for one term per vocabulary.
Thanks!
#6
Partially working for me. Images show up in Safari but not Flock (Firefox). Weird. Continuing to investigate.
Update: this is what the links look like in FF
<a href="/category/features/bathrooms"/>and in Safari:
<a href="/category/features/bathrooms"><img src="http://tgcore/sites/default/files/imagecache/Icon/category_pictures/mapsymb_20.png" alt="Bathrooms" title="Bathrooms" width="24" height="24" /></a>I can't think of any reason why the output would be different in FF vs. Safari.
#7
The only reason I know for Drupal stuff to appear different in different browsers is that you are logged in (possibly as superuser?) in one and not in the other. This causes one browser to fetch from the cache and the other to render new.
#8
That was it. I had to grant "access taxonomy images" to anonymous to see the images.
That doesn't seem right to me however. I would think the default should be to show images by default. Also, "view" would be more consistent with other modules than "access". "Access" implies some sort of edit ability.
Other than that, the patch seems to work as advertised (applied against 6.x-1.6).
#9
Thanks.
(The permission in question is part of the module itself, and is not created by this patch.)
#10
Yeah, I knew the permission was from the module. I probably should create a new issue for that. I was on the train and about to lose internet service, so I was in a bit of a hurry when I posted :).
#11
I'm using this patch in production and now 2 people have said it worked for them, so I'm going to set this status in hope of it getting included in the module itself.
#12
I just wanted to thank you for this patch which made Taxanomy Image+views usable for me!
This really ought to make it's way into the next release.
#13
It'd be great to get this committed...
#14
@likeless this is awesome. thank you.
#15
thank you very much!