By droweski on
cck display field set to “file path”
using fields in php functions in node-content.tpl.php file
expression: print $node->field_content_image[0]['view']
renders as: sites/default/files/content/image.jpg (just like the book says)
expression: $path = print $node->field_ content _image[0]['view']; print $path;
renders as: sites/default/files/content/image.jpg 1
and variable $path cannot be used in string or array php expressions
same thing goes with: $node->field_content_image[0]['value']
also with: $field_content_image[0]['view']
what am I missing here?
thanks
Comments
I am not sure 'print' returns
I am not sure 'print' returns anything so it is unclear what $path would hold after
Maybe you mean to use
You are right
Got so busy trying to figure out Drupal, I forgot my php!