I am trying to render an image with imagecache in computed field. Is this possible or am i doing something wrong?

I put code this code in computed code field

$node_field[0]['value']=  "theme('imagecache', 'default_150', $node->$field_gallery[0]['filepath'])";

and all i get is errors. How could i do this with computed field if at all?

Comments

Marko B’s picture

In main post code had errors so it wasnt going to work anyway

I tried a more proper solutions like, in computed field code

$node_field[0]['value']= theme('imagecache', 'default_150', $node->field_gallery[0]['filepath']);

and in display

$display = $node_field_item['value'];

and another variation is to change display field to $display = theme('imagecache', 'default_150', $node_field_item['value']);
but no output

Marko B’s picture

Hi :-)

Guessing its not possible to use theme function in comptued field but maybe i would need to make outside theming
But i have another problem, can't get some cck variables, like i can output $node->field_gallery[0]['fid']); but cannot output $node->field_gallery[0]['filepath']); any idea why?

mmjvb’s picture

Issue summary: View changes
Status: Active » Closed (outdated)