What is the best way to show custom field information in node.tpl.php in Drupal 7 Hi I want to show in node.tpl.php this information about a custom filefield :
File name , File type , file weight and link to download
Something like this might demonstrate the fields available

&lt;?php
$file = $node-&gt;field_yourfieldname[ $node-&gt;language ][0];
$mime = $file['filemime'];
$size = round($file['filesize'] / 1024 / 1024,1); // in MB
$description = $file['description']; // optional
$filename = $file['filename'];
$link = file_create_url($file['uri']);
?&gt;


Hmmm, if $node's not available try something like this at the start

$file = $content['field_yourfieldname']['und'][0];