I have a content type that contains a field called headshot. This is a file field. In my custom node template file, I need to access the value of the headshot's filename property. dpr($content)
produces this for the field:
[field_headshot] => Array
(
[und] => Array
(
[0] => Array
(
[fid] => 53
[display] => 1
[description] =>
[uid] => 10
[filename] => kanderson.jpg
[uri] => public://headshot/kanderson.jpg
[filemime] => image/jpeg
[filesize] => 21669
[status] => 1
[timestamp] => 1337356962
[type] => image
[rdf_mapping] => Array
(
)
[image_dimensions] => Array
(
[width] => 180
[height] => 252
)
)
)
)
I've tried
<img class="speaker_headshot" src="sites/default/files/styles/large/public/headshot/<?php print render($content['field_headshot'][0]['filename']); ?>" alt="<?php print $title; ?>" />
and
<img class="speaker_headshot" src="sites/default/files/styles/large/public/headshot/<?php print render($content['field_headshot']['filename']); ?>" alt="<?php print $title; ?>" />
with no success. How do I access this property?