Posted by BWPanda on July 21, 2012 at 7:09am
3 followers
| Project: | Image Matrix |
| Version: | 7.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
I'd like to request that the ability to display image captions be added to this module. I recommend copying what Colorbox has done and allowing users to select captions as being 'automatic' (image title, alt or node title used), 'image title', 'image alt tag', 'node title', or 'none'.
This would be especially useful when integrating with Colorbox.
Comments
#1
You can use anything you like as a "caption" right now - just add for example
Content: Titlefield to your view (make sure that it is added after image, so that it will be displayed over it) and format it in a way you like using CSS.#2
Sorry, I was referring to when using Image Matrix as a field formatter in a content type. I had Alt tags enabled for my images but there didn't seem to be a way to display them...
#3
Feature added in the most recent dev version, just pushed to d.o.
#4
Automatically closed -- issue fixed for 2 weeks with no activity.
#5
The changes you committed did add an extra div showing the alt and title text, but that doesn't actually solve the problem of displaying the alt or title text as a caption in Colorbox.
I've worked out that to display a caption, Colorbox simply takes the alt or title text and adds it as the title attribute of the link (as opposed to the image). You code was already adding the image's title text as a title attribute, but it wasn't doing it for the alt text too.
The attached patch adds the alt text of the image as the title attribute of the link if there isn't already a title attribute set. This solves the problem for me.
#6
Thanks Peter, patch applied, new dev version just pushed to d.o.
#7
Automatically closed -- issue fixed for 2 weeks with no activity.