I was able to get the image to show in the place that I want, but I was curious if there was a way if I could have that image perhaps linked to that taxonomy term?
Thank you very much!
I was able to get the image to show in the place that I want, but I was curious if there was a way if I could have that image perhaps linked to that taxonomy term?
Thank you very much!
Comments
Comment #1
Bevan commentedThat's what taxonomy_image module is for. I think I'm not understanding your question / problem correctly...?
Comment #2
dmetzcher commentedI think this is a question about having the user be able to click the taxonomy image on a node and have all nodes within that taxonomy be displayed. That's my question, anyway.
Comment #3
brewreview.info commentedI think bevan is right: this is functionality that should come straight "out of the box", without much hacking. For example, here's what I have in my node.tpl.php to display all of the taxonomy_images I have associated with each node -- and all images linking to their respective term:
(I think there's a code mod for this floating around that automatically uses the more intuitive URL Alias vice the clunky "/taxonomy/term/###" URL syntax, but it works well enough for my needs...)
Hope this helps some; YMMV.
Cheers,
//TB
Comment #4
goddess commentedOk, I'm thinking if you change this line from this-
echo "<a href=\"".base_path()."taxonomy/term/".$term->tid."\">".taxonomy_image_display($term->tid, " alt='$term->name'")."</a>";To this, with the name specificed in the link code instead of "tid" for the term id, it might work.
echo "<a href=\"".base_path()."taxonomy/term/".$term->name."\">".taxonomy_image_display($term->tid, " alt='$term->name'")."</a>";You'd have to watch your pathauto to make sure your individual setup complies...I haven't tried it yet, though, but was interested in doing something similar. Someone please correct me if that's not accurate.
Comment #5
nancydruBut not everyone wants the term to link like that. How would you resolve that dilemma?
And, yes there is a function in the path module that will look up an alias for you, but it will be displayed anyway when the user sees the resulting page. How many users look at the link preview to see where it's going? Most of mine don't even know it's there.
Comment #6
nancydruComment #7
summit commentedSubscribing in relation to the taxonomy_block module to show images with nodes.. greetings, Martijn
Comment #8
nancydruThe taxonomy_image_get_object function will build a "taxonomy/term/xxx" path and replace it with an alias, if one exists. You'll still have to put it all together for the time being though.
Comment #9
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.