Item file linking to file page w/ metadata (instead of file itself)

Hi all,

I'm sorry if this is a very simple problem; I've been trying a lot of solutions related to this problem that I've found on the forum, but to no avail.

I am running Omeka 2.2.2, and am having trouble doing something that seems very simple. In my item pages, I would like the thumbnail versions of files to link to the /file page associated with them (containing all of the Dublin Core metadata), instead of going directly to the .jpg file.

I have tried editing my /items/show.php page in the theme that I'm using (emiglio) to add <?php echo link_to_file_show(); ?>, but this always returns an error:

Omeka_View_Exception
A current file variable has not been set to this view.

I'm not sure what I'm doing wrong, but I'd love any suggestions!

best,
-s

If you replace

<?php echo files_for_item(array('imageSize' => 'fullsize')); ?>

with this

<?php echo files_for_item(array('imageSize' => 'fullsize', 'linkToMetadata' => true)); ?>

the links should go to that page

This is perfect! Thank you so much!