Drupal Imagecache Actions with ImageField and Node variables

Posted by HS2323 on Stack Overflow See other posts from Stack Overflow or by HS2323
Published on 2010-04-02T15:07:02Z Indexed on 2010/04/02 15:33 UTC
Read the original article Hit count: 166

Filed under:

I am able to add text to onto a imagefield using the imagecache textrender preset action (for a content type). I pull the node title using the following in the imagecache preset text:

global $node; 
return $node->title;

However this only works when an image is uploaded when creating new content. If I have an image set as a default for the content type (and none are added when creating the new page) then it won't overlay the node title. I tried just regular text in the preset action field on the default image and it worked. Can anyone help me with this?

© Stack Overflow or respective owner

Related posts about drupal