I want "border=0" added to the resulting Only local images are allowed. tag that is output by this:

print theme('imagecache', 'articleimage_thumb', $field_news_image[0]['filepath']);

I tried adding extra arguments at the end of the function, which did create an "ALT" and a "TITLE" but can't figure out how to get "border=0" in there.

Thanks

Comments

Chill35’s picture

Attributes are next on the list I think, after ALT and TITLE :

function theme('imagecache', $path, $alt = '', $title = '', $attributes = NULL, $getsize = TRUE)

$attributes has to be an associative array... hence it would be

print theme('imagecache', 'articleimage_thumb', $field_news_image[0]['filepath'], '', '', array('style' => 'border:0px;'));

Something like that. Have you tried that ?

'' <--- that's two quotes, i.e. an empty string).

Caroline
11 heavens

marsrc’s picture

Works great, thanks! I was passing it as a string, like: "border=0" ... passing an array makes much more sense.

Chill35’s picture

:)

Caroline
11 heavens

neroflick’s picture

Worked for imagecache! But can this be used for lightbox preset also? i tried it but it didn't work.