Posted by thePanz on October 16, 2008 at 3:34pm
3 followers
| Project: | ImageCache |
| Version: | 6.x-2.0-beta1 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Hi, I noticed that using Imagecache and setting to "Display PRESET_NAME image" displayed image don't have any "Class" attribute setted.
I changed imagecache.module in line 630/631 to
<?php
default:
return theme('imagecache', $presetname, $item['filepath'], $item['data']['alt'], $item['data']['title'], array('class' => $class));
?>solves my issue.
Maybe the preferred solution to have a setting for preset about "class" or other HTML attributes.
Regards
Comments
#1
please roll a proper patch http://drupal.org/patch
#2
-- duplicated comment ---
#3
This is my patch. It's a simple one, but maybe themers or sites admin need more advanced way to set an imagecache IMG class attribute!
Regards!
my patch is against latest HEAD CVS version (I didn't find any drupal--6 branch).
#4
I forgot to change issue status.
#5
Thanks, removed an extra space (that was there before the patch) and committed the attached to HEAD.
#6
marked #309221: image class not showing in teaser as a duplicate
#7
Automatically closed -- issue fixed for two weeks with no activity.