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

xano’s picture

Assigned: Unassigned » xano
Category: feature » support

Yes. 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.

pindaman’s picture

I 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

xano’s picture

That's because your code is wrong. You're loading the image for the parent. Check the API docs on vocabindex_link.tpl.php.

xano’s picture

Status: Active » Fixed

No new problems seem to have arised, so marking this fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

jddeli’s picture

Xano
what is the right code for loading the image?

xano’s picture

Assigned: xano » Unassigned