Active
Project:
Taxonomy Image
Version:
6.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
28 Aug 2008 at 16:38 UTC
Updated:
14 Jul 2012 at 19:33 UTC
Jump to comment: Most recent
Comments
Comment #1
chasz commentedhello i put it into my theme node.tpl.php so why wont it show ?? :D
Comment #2
techutopia commentedHi,
I'm not quite sure if this is similar issue, but I am using recursive image display.
I've added this code to node.tpl.php (and I use the pixture theme)
The resultant is :
... so both of these bars are known .... but $output always returns a null.
The term ACHESON does not have a taxonomy image added, but it's parent does.
Happy to answer any questions in hope of a solution.
Many thanks in advance.
D.
Comment #3
chasz commentedcan anyone help us ?
Comment #4
nancydruBoth of those look like they should work (although I am not a theme guru). However it is unnecessary; the taxonomy_image_link_alter add-on module will do that for you with no theme changes.
Comment #5
chasz commentedthat addon sounds like it replaces the link with an image
with this we would like to add addition image link at another location
i justr would like to see the variable and we theme it
Comment #6
nancydruHere's a working template:
Comment #7
nancydruComment #8
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #9
glennnz commentedNancyDru
I copied your code, but it won't work for me, the image doesn't display.
In my node.tpl.php file I have:
It won't display the image..... I know the image is loaded correctly; I can see it when I edit my taxonomy.
Thanks
Glenn
Comment #10
Anonymous (not verified) commentedIn my case in node.tpl.php, the function
taxonomy_node_get_termsreturned an emtpy array. Yet all the tids were stored in$node->taxonomy.So a working snippet in node.tpl.php would be:
Should be part of documentation!
Comment #11
volocuga commentedmorningtime: The code you provided works BUT! How to display only images that belong to certain vocabularies?
Comment #12
nevets commentedHow about
Comment #13
volocuga commentednevets:
Thank you for quick reply!
But your code does't work for me :(
Comment #14
nevets commentedDid you change
$wanted = array(3, 5);and replace '3,5' with a comma separated list of the vocabularies you want?Comment #15
volocuga commentedYes, sure.
Comment #16
nevets commentedTypo:
in_array($term->tid, $wanted)should have beenin_array($term->vid, $wanted)Comment #17
volocuga commentednevets:
Thank you, now it works!
So, here is final edition:
The solution has to be included in documentation.
Comment #18
Peppigno commentedHi volocuga.
That function works well but it generates an invalid XHTML code (print title attribute twice!).
The definitve code should be this:
It passes W3C validator. Bye!