Please consider adding support for Taxonomy Image.
This is from the module's description:
The taxonomy_image module allows site administrators to associate images with taxonomy terms. With the association created, an admin can then make a call to taxonomy_image_display() from their theme or other PHP code to display the appropriate image.
Comments
Comment #1
klonosadding the following code did it:
This displays the corresponding image next to each term.
Comment #2
traceelements commentedWhere do I add this code?
Comment #3
klonoswell... it goes in the taxonomy_blocks.module file. That's the only thing for sure ;)
Where in that file you say? ... I only can give you some clues because it seems I've modified mine to such an extend that it now displays items in a table instead of a list + other custom things I needed.
As it is now, the module prints a list of html links pointing to the term page, like so:
<a href="path_to_term"></a>I wanted it like so:
. This prints the links of your list (the l() function is documented here: http://api.drupal.org/api/function/l)
I couldn't figure out how to change it to display an image with a link back in February when I took a shot at it. There seems to be a discussion about it going on here: http://drupal.org/node/105249
2. ...so I added this code before:
You can tell I left some work to be done here because of the empty
$output .= '';(I probably wanted to add an alt attribute or something here). You can also see the two commented out lines abouttaxonomy_image_urlandtaxonomy_image_get_url. I cannot remember what I needed with these.Anyways, the code above writes a html tag with an image.
1st line opens the tag and adds a class to it so I can customize it with css later on.
2nd line... as I said I cannot remember why I wrote it. It does nothing.
3rd line checks if the Taxonomy Image module is installed.
4th line appends the taxonomy term's image to the output variable.
5th & 6th line again I cannot remember what I needed to do with them
7th line closes the tag
I cannot remember if it worked or not. I think I gave up on the idea. I am not sure.
Good luck with that.
Comment #4
traceelements commentedOh my god, it worked! Thank you so, so much!
This is what I ended up using, because I wanted the image followed by the text link:
Comment #5
klonosI'm glad you're glad ;)
Comment #6
klonosbtw, the
class="dock-item"part is to add a class that will help you with css styling the image. Feel free to change it as desired.