Eliminating square thumbnails in Emiglio

I've checked the documentation and have searched the forums, but I'm still at a bit of a loss as to how to get the Emiglio theme on Omeka 2.2.2 to display proportional thumbnails instead of square thumbnails on item show pages and wherever featured items are shown. Basically I never want to show square thumbnails.

I've managed to find and replace square_thumbnail with thumbnail for Collections items, but things are a bit abstracted in that theme, and I can't find where the featured item display is managed. I suspect that I need to write a function or something to override the random_featured_items function -- is that right? If so, should it go in custom.php in the theme folder?

The display of featured items is controlled in all the current (2.2.2) themes by the file items/single.php.

Most themes don't have their own version of that, so you'll have to copy it in from application/views/scripts.

Ah, terrific. That worked. Thanks, John.

Just a note for future reference: in Emiglio there's also a CSS class defined where #featured-item has a margin-bottom of 0em; this was making the thumbnail display as square in the the containing 'item record' div even after I put the single.php file in /emiglio/items/ and edited it to show 'thumbnail' instead of 'square_thumbnail.'

Actually I wound up just removing the 'image' class from the item link. Original code in single.php:


<?php if (metadata($item, 'has files')) {
echo link_to_item(
item_image('square_thumbnail', array(), 0, $item),
array('class' => 'image'), 'show', $item
);
}
?>

Revised code:


<?php if (metadata($item, 'has files')) {
echo link_to_item(
item_image('thumbnail', array(), 0, $item),
array(), 'show', $item
);
}
?>

Sorry, one last stubborn square thumbnail I can't get rid of in my modded version of the Emiglio theme -- it's on the item show page, e.g., http://www.steepletoplibrary.org/items/show/1580. I've got 'thumbnail' set in /items/single.php in the theme but the square thumbnail is called by the function 'files_for_item' in show.php.

I checked the documentation for that function at http://omeka.readthedocs.org/en/latest/Reference/libraries/globals/files_for_item.html but can't tell from that if the function has an option to set 'thumbnail' instead of 'square_thumbnail.'

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

Should do the trick.

Thanks so much, Rachel!! I've really got to actually learn PHP at some point instead of just copying and pasting code ...