By robertem on
Hi everybody, I haven't done much theming of views since the 2.x release and am having a little issue.
I am trying to figure out how I can replace the "node: type" field in my Articles view with icons, i.e. the type "video" would have it's own icon.
I've been searching for information online to figure out the proper tpl file without success.
I'm using Views 6.x-2.8
Any help would be appreciated.
Thanks,
Rob
Comments
Taxonomy and Taxonomy Image
Rob,
I can think of two solutions.
1) Taxonomy and Taxonomy Images modules. Views and Taxonomy have given me some trouble working together in the past, but you should be alright. Instead of having a different content type for each node type you could assign a set of terms in a vocabulary to categorize them and assign each one an image.
2) Add a CCK Imagefield to each content type. Give each one a default value. Set its display to hidden. Then you should be able to call that in Views.
Hope that helps.
Thanks Scalp, I think I was
Thanks Scalp,
I think I was able to get what I needed by using case in the tpl file but it looks like I should have looked at Taxonomy Image first.
Here's the code in case anyone finds this through a search and is trying to do the same thing.
File name: views-view-field--type.tpl.php