I have installed CKK and Imagefield and both are working excellently. I turned the display on Imagefield to "" and intend to use content_format(); to display the image. However, when I use the following code below, it returns nothing. I spent several hours trying everything I could think of, but yielded no results. $field_fullimage[0] is returning an array of data about the image. The uploaded image will display if I change the display on Imagefield to one of the several formatting options provided. Any thoughts on this matter would be greatly appreciated.

Code attempted:
print content_format('field_fullimage', $field_fullimage[0]);

--- and ---
print content_format('field_fullimage', $field_fullimage);

Comments

basicmagic.net’s picture

subscribe

Drupal samurai for hire, based in Buffalo, New York, USA.
15+ years Drupal, 20+ years web.
http://basicmagic.net

theabacus’s picture

to?

thatguynamedandy’s picture

I'm having the same problems, did you get a resolution to this?

hollybeary’s picture

I've never used content_format before but have you tried <?php print '<img src="/'.$node->field_fullimage[0]['filepath'].'" />'; ?>

That's usually what I do

OpenChimp’s picture

Using the code that you suggest would remove the ability to change the formatting through the drupal cck admin screens. The huge advantage that content_format() offers is that you can modify the formatting by changing the settings on the field configuration screens.

rizqi’s picture

i have same problem and already solve this
try this, it works with me..

$imagecache_preset = 'news_thumbnail';
$node = node_load($nid);
print content_format('field_image',$node->field_image[0], $imagecache_preset . '_default',$node); 

Rizqi
Professional Drupal Developer
Surabaya, Indonesia

korayal’s picture

yep this one's working but, what's the use for this then? ;

admin/content/node-type/nodetypename/display

For example, I set that imagefield to be as link to the content on teasers, and as lightbox link to the bigger image on the node pages.

But when I use your code, it displays the same thumbnail without link on both content type.

korayal’s picture

I found out the problem, also included a solution here;

http://drupal.org/node/303455#comment-993032