In Drupal 7.x, given a nid and a file field name, I'm trying to get the files (as $fid or objects) which have been uploaded as file attachments to that node.
Drupal will populate the uploaded files only when they are set as "displayed" but I need to do this for all the files of that field, no matters how they display setting is.
I've spent quite some time investigating into this but the new d7 file api looks pretty obscure from a documentation and code point of view. IMHO, too much "drupal magic" happening there for a fast understanding.
Any pointer to good documentation and/or suggestion on the solution greatly appreciated.
Thanks.
node.tpl.php
file, then you should already have access to the current node. You should then be able to do something like$content['field_attached_file']['#items']['0']['value'];
to access the file. See the node.tpl.php documentation for more info. - nmcdpm($node)
) the node to see what you have access to. - nmc