Update taxonomy_image.module to return a hyperlinked image.

By updating the final return string in the function taxonomy_image_display to return the following:

"<a href='/taxonomy/term/$tid'><img src='$current->url' width='$current->width' height='$current->height' $tags /></a>"

the image can be used to list all entries with that taxonomy term.

I will develop a configuration setting for the module to enable/disable this feature.

I would need some pointers to properly - read dynamically - create the "/taxonomy/term/$tid" string.

Paddy.

Comments

mikeryan’s picture

I did this in my theme, but it would be nice for the module to have the option of doing it directly. One thing - don't forget using drupal_get_path_alias() so you can output the preferred alias for the term, if one exists.

It'd also be nice if by default an alt attribute valued with the term name was generated.

puredrivel’s picture

How about an optional configurable hyperlink appearing under the image when editing/uploading it rather than a hard-coded one so each taxonomy image could go anywhere?

NancyDru’s picture

Status: Active » Closed (won't fix)

If you still want this in 5.x, open a new feature request, please.