Hi. I'm using ImageCache, ImageField (cck), and Lightbox. Life was good, until I realized that any CCK ImageField I set Lightbox to manage (via Manage Fields), no longer had the "ImageCache" class attached to it.
In other words, Lightbox is stripping any CSS classes I'm trying to attach to my CCK ImageField img tags.
So...
Before I enable Lightbox on an ImageField, the output looks like this...
<a class="imagecache imagecache-articles imagecache-imagelink imagecache-articles_imagelink" href="http://westernwearandgear.com/sites/default/files/rodeo3.jpg">
<img class="imagecache imagecache-articles" height="134" width="200" title="Cowboys" alt="American Cowboy Picture" src="http://westernwearandgear.com/sites/default/files/imagecache/articles/rodeo3.jpg"/>
</a>
Note the img classes "imagecache". I need this imagecache class so I can tweak the style of images managed by imagecache.
Now, once I enable LightBox...
<a class="lightbox-processed" rel="lightbox[field_image][Rodeo Pic Testing CCK and Placement]" href="http://westernwearandgear.com/sites/default/files/rodeo1-big.jpg">
<img height="154" width="200" title="imagecache testing" alt="testing testing" src="http://westernwearandgear.com/sites/default/files/imagecache/articles/rodeo1-big.jpg"/>
</a>
The classes totally disappear? I reallllly need an image class on these divs so I can assign them a max-width and auto height to make images liquid/scalable (otherwise, my otherwise liquid site, looks like crud at < 1024x768.
Any ideas? See attachment if my description wasn't clear. Thanks.
Comment | File | Size | Author |
---|---|---|---|
you-upset-me-lightbox.jpg | 355.99 KB | NickWebman |
Comments
Comment #1
NickWebman CreditAttribution: NickWebman commentedAny love?
Comment #2
NickWebman CreditAttribution: NickWebman commentedSetting to critical.
Comment #3
NickWebman CreditAttribution: NickWebman commentedStill struggling...
Comment #4
tomsm CreditAttribution: tomsm commentedany solutions...?
Comment #5
NickWebman CreditAttribution: NickWebman commentedtomsm: are you experiencing the same issue? Figured it was something I did weird.
Comment #6
tomsm CreditAttribution: tomsm commentedno, the issue is fixed. thanks for asking.
Comment #7
NickWebman CreditAttribution: NickWebman commentedTomsm: do you recall what resolved the issue for you?
Comment #8
tomsm CreditAttribution: tomsm commentedI applied the css to the img tag instead of the imagecache class.
Comment #9
NickWebman CreditAttribution: NickWebman commentedBut doesn't that assign whatever css you give to img to ALL images on the site? That won't fly for what I'm trying to do.
Comment #10
tomsm CreditAttribution: tomsm commentedno, you can combine a class with an img tag in a css rule, so that only the img tags in that class are affected.
Comment #11
NickWebman CreditAttribution: NickWebman commentedRight, but since lightbox is stripping the classes from the img tags, I can't do that.
Comment #13
stella CreditAttribution: stella commentedIt's not that the class names are being stripped out, but rather it is a completely separate cck formatter, and none were specified. So I've added in a bunch of css classes now. Available in next dev and official releases.
cheers,
Stella
Comment #14
NickWebman CreditAttribution: NickWebman commentedawesome. Thanks Stella