Closed (fixed)
Project:
Image
Version:
6.x-1.x-dev
Component:
image.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
21 Aug 2009 at 15:27 UTC
Updated:
9 Sep 2009 at 18:50 UTC
Jump to comment: Most recent file
Comments
Comment #1
joachim commentedI see the point of customizing the title, but I'm not sure I see the point of this patch.
How are you controlling what is passed to theme_image_display?
Surely if you're changing that, then you could equally override theme_image_display?
Also, what about ALT text?
Comment #2
blakehall commentedI agree it's not too tough to just override the theme function. The point is the default theme function should at least _allow_ passing in the title and alt via attributes rather than hard coding them.
With this patch you can call theme('image_display', $node, $label, $url, array('title' => 'My title', 'alt' => 'My alt text')
It would be trivial to add similar support for alt text.
Let me know if this explanation addresses your concerns. Thanks!
Comment #3
joachim commentedSure, but what I'm wondering is -- where might you call that from?
Comment #4
blakehall commentedIn our case, it's in a custom view handler.
We're displaying images that are attached to nodes related to the nodes that make up a view (if that makes sense). We want the alt and title text of the images to relate to the node relationship rather than the node that makes up the view. Without a custom handler you can only set the alt and title text of the anchor tag, rather than the actual image.
Comment #5
joachim commentedAh right!
I couldn't see a case for this, but that makes sense.
The patch needs to deal with ALT along the same lines. If you have a second to make that change I'll commit it.
Comment #6
blakehall commentedThis patch will allow both the alt and title text to be passed into theme_image_display via the attributes parameter.
Thanks!
Comment #7
joachim commentedGreat :)
Committed to HEAD.
Are you going to be at DrupalCon next week? I am trying to gather people together for a final code sprint to get image 1.0 released!
See http://paris2009.drupalcon.org/forum/image-10 for details.
Comment #8
blakehall commentedUnfortunately I won't be at DrupalCon Paris... I'm only able to make the spring events in North America.
I'll see if I can scrounge up some time to help with the sprint efforts though.
Comment #9
joachim commentedThat would be a big help.
anything you can do in the next week basically -- lots of patches need testing :)