Closed (fixed)
Project:
Vocabulary Index
Version:
6.x-2.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
13 Apr 2009 at 18:43 UTC
Updated:
24 Jul 2013 at 08:54 UTC
Xano,
Your module is great.
It would be nice to theme the index with images.
- can taxonomy images be used with your module? if so how.
Any code is welcome.
thanks
Comments
Comment #1
xanoYes. Taxonomy Image provides a function with which you can load images for terms. Use this in vocabindex_link.tpl.php to display them. You will have to check the Taxonomy Image documentation for the precise usage of this image loader function.
Comment #2
pindaman commentedI have found the following code in the documentation
if (module_exists('taxonomy_image')) {
if ($image = taxonomy_image_display(arg(2))) {
print $title . "" . $image . "";
}
foreach (taxonomy_node_get_terms($node->nid) as $term) {
if ($image = taxonomy_image_display($term->tid)) {
print $term->name . "name . "'>" . $image . "";
}
}
}
when placed in the vocabindex_link.tpl.php I see images. Only in the wrong place.
I have a cat1
sub 1
sub 2
cat2
cat3
parent view shows cat 1 cat 2 etc. --> NO images
cat page schows sub 1, sub 2 ---> Images of parent cat/term
sub page shows links to nodes
How can i get those images to show on the right place??
Thanks
Comment #3
xanoThat's because your code is wrong. You're loading the image for the parent. Check the API docs on vocabindex_link.tpl.php.
Comment #4
xanoNo new problems seem to have arised, so marking this fixed.
Comment #6
jddeli commentedXano
what is the right code for loading the image?
Comment #7
xano