Description
get_current_file()
returns a file object to use for templating, for example when you are looping through an item's files.
Usage
<?php $current_file = get_current_file() ?>
Arguments
None
Return Value
File or null
Examples
This example begins by creating an unordered list, then populating its list items by using a while loop to step through the individual files.
<ul> <?php while(loop_files_for_item()): $file = get_current_file();?> <li><?php echo $file->original_filename; ?></li> <?php endwhile; ?> </ul>