Featured Item with Image (not using display_random_featured_item)

Shouldn't this work?

$items = get_items(array('withImage' => true,'featured'=>true,'recent'=>true), 10);

I'm trying to use it like so, in combination with a jQuery slideshow...

<div id="showcase" class="showcase">
 		<?php
		//this loops the most recent featured items
		$items = get_items(array('withImage' => true,'featured'=>true,'recent'=>true), 10);
		set_items_for_loop($items);
		while(loop_items()):
		?>
			<?php $index = 0; ?>
			<?php while ($file = loop_files_for_item()): ?>
			    <?php if ($file->hasThumbnail()): ?>
			    <!-- this makes sure the loop grabs only the first image for the item -->
			        <?php if ($index == 0): ?>
		    	       <?php echo '<div><img src="'.item_file('fullsize uri').'"/>'; ?>
		    	       <!--uncomment the next line and activate thumbs in settings to use thumbnails for gallery nav-->
		    	       <?php //echo '<div class="showcase-thumbnail"><img src="'.item_file('square thumbnail uri').'"/><div class="showcase-thumbnail-caption">'.item('Dublin Core', 'Title').'</div><div class="showcase-thumbnail-cover"></div></div>'; ?>
		    	    <?php endif; ?>
			    <?php endif; ?>
			<?php endwhile;?>
			<?php
			echo '<div class="showcase-caption">';
			echo /*Item Title/Link*/'<h3>'.link_to_item().'</h3>';
			echo /*Item Description Excerpt*/'<p>'.item('Dublin Core', 'Description',array('snippet'=>190));
			echo /*Link to Item*/ link_to_item(' ...more ').'</p></div></div>';
			?>
			<?php endwhile; ?>
 </div>

I see a post here from a while back regarding a related problem, and instructing to use a custom function to get an item with an image:
http://omeka.org/forums/topic/featured-collection-exhibit

But I also see that there is a parameter for this function that already accomplishes this:
http://omeka.org/codex/Theme_API/display_random_featured_item

So I guess part of my question is to ask if $withImage will ever become a more broadly used parameter (perhaps with 1.3?) and the other is how I might adapt the custom function above to fit my loop.

I'll keep plugging away on this and hopefully figure something out, but any info or help is welcome.

Thanks,

Erin

Looks like this works for now, at least partially...

$items = get_items(array('featured'=>true, 'recent'=>true,'type'=>'Still Image'), 10);

...but thinking ahead, I can imagine some issues with this, namely that not all users will define the Item Type of every item (at least not the teachers I am working with for this project) and also some non-"Still Image" items may still have an image attached that would be useful to display.

any thoughts?

Hi Erin,

Sorry we missed this thread. You're right that there isn't a way currently to retrieve items, regardless of item type, that have an image file associated with them. Your second solution, to get items that have type 'Still Image', is reasonable, but does have its limits.

This seems like a good feature to have to me, so I'll add a ticket for this and see if we can get it into a future Omeka release.

I just added a ticket for this feature on the our Trac.

Thanks Jeremy.