Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
mikeryanI 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.
Comment #2
puredrivel CreditAttribution: puredrivel commentedHow 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?
Comment #3
NancyDruIf you still want this in 5.x, open a new feature request, please.