I realize I could override this with a theme function, but it seems an unexpected result to me that if I hard-set an alt tag when calling 'image_display' it will not override the default setting of $node->title.
ie, theme_image_display would behave as I expected if it looked like this:
return '<img src="'. check_url($url) .'"'.!empty($attributes['alt'])?'':'alt="'. check_plain($node->title).'"') .!empty($attributes['title'])?'':'title="'. check_plain($node->title).'"'). drupal_attributes($attributes) .' />';
i guess that could get a little out of control, particularly if applied to the src attrib, but .....
reason being is that FF goes with the first ALT tag it sees, making my $attributes passed alt tag invisible.
Comments
Comment #1
drewish commentedcould you roll a patch? it'd make it a lot easier to see exactly what'd need to change.
and i'm wondering why we're not calling theme_image there...
Comment #2
ragaskar commentedyeah, as soon as i get a chance i will submit a patch .. having a client meet thursday, so it might be a week or so. sorry.
Comment #3
drewish commentedokay so after looking at this. the correct way for you to set your own title is to add your own theme function for theme_image_display() and just add your own title there.
i'm committing the attached patch which uses theme_image to build the img element.
Comment #4
ragaskar commentedcool! that looks like it'll do it for me! Thanks!
Comment #5
(not verified) commented