Is there any way to make display_files_for_item link to the fullsize image instead of the original?
Currently, I have the following line in my show.php file:
<?php echo display_files_for_item(array('imageSize'=>'fullsize')); ?>
This creates an image that has been scaled down on the item page, that links to the a jpg in omeka/archive/files. I would prefer it link to omeka/archive/fullsize.
Here's the work around I came up with:
<?php if(item_fullsize()): ?>
<?php while(loop_files_for_item()):
$file = get_current_file(); ?>
<a href="<?php echo file_download_uri($file, 'fullsize'); ?> "rel="lightbox[gallery]"><img src="<?php echo file_download_uri($file, 'fullsize'); ?>"></a>
<?php endwhile; ?>
<?php else: ?>
<?php echo display_files_for_item(); ?>
<?php endif; ?>
It would be a lot easier if you could specify which derivative image file the display_files_for_item links to.
You can simplify you code a little bit, because display_files_for_item
allows you to pass the link href:
<?php while (($file = loop_files_for_item()): ?>
<?php display_file($file, array(
'imageSize' => 'fullsize',
'linkAttributes' => array(
'href' => file_display_uri($file, 'fullsize')))); ?>
<?php endwhile; ?>
You're correct, though. With the ability to choose the type of file to link to, you'd be able to do this in just one line.