So I am working on manipulating the omeka homepage a bit for my project. I have the "featured collections" and the "featured exhibits" galleries on my homepage. The "featured collections" gallery includes four images thumbnails from the collection that is featured. I am trying to do the same for the featured exhibit but am running into some difficulties. So far I have been able to make four thumbnails appear right below the "featured exhibits" gallery, in the right place, and as the right size by using the same div id and styling as the featured collection thumbnails, but I seem to be pulling from all featured items rather than the particular featured exhibit that I have on the homepage. I have gotten to this point by manipulating the code on the index.php file of theme immediately following the function for displaying the information on the featured exhibit. This is the code that I have so far:
<div id="index-collection-img">
<?php
$items=get_records('item', array('hasImage'=>true, 'featured'=>true, 'Exhibit'=>$exhibit),$num=4);
if(count($items)>=$num){
set_loop_records('items', $items);
if (has_loop_records('items')){
foreach (loop('items') as $item){
echo link_to_item(item_image('square_thumbnail'));
}
}
}?>
</div><!-- end exhibit-items -->
Any suggestions on how to manipulate (or scrap this and start over) this in order to pull four thumbnails from items with images in the exhibit that is being featured on the homepage?