I have a file field in a node and I would like all instances of this field to have a different display name.
I use the file field to upload images that users can download - e.g. flower.jpg, horse.jpg.
Instead of the field displaying " flower.jpg",I want it do display the text "download".
The machine name of my field is "field_source" and the name of my theme is " kickstart". The content type is " resource".
What would a pre-process function in my template.php look like to do this?
This is as far as i get:
function kickstart_preprocess_node(&$vars){
if($vars['type'] == 'resources'){
$vars['content']['field-source']['#title'] = 'download';
}
}
Thanks!