I am have a theme where I am working on similar functions. This is not working quite the way I would like yet, but it might give you ideas.
Question 1: Featured Items pull items from any collection.
I made a column on the home page to get a random featured collection (which if one could set to a specific collection), and then show 3 items from that collection.
<!-- Featured Collection -->
<div id="featured-collection">
<div class="block">
<?php echo display_random_featured_collection(); ?></div>
<!-- Get Current Collection -->
<?php echo get_current_collection(); ?>
<div id="feature-items">
<div class="items-list">
<div class="collection-item">
<!-- Get Items in Current Collection-->
<h2>Items</h2>
<?php set_items_for_loop(loop_items_in_collection(3));?>
<?php if (has_items_for_loop()): ?>
<?php while (loop_items()): ?>
<!-- Display Items in Current Collection -->
<h3><?php echo link_to_item(); ?></h3>
<!-- Display Thumbnail -->
<?php if (item_has_thumbnail()): ?>
<div class="collection-img">
<?php echo link_to_item(item_square_thumbnail()); ?>
</div>
<?php endif; ?>
<!-- Display Item Description -->
<?php if ($desc = item('Dublin Core', 'Description', array('snippet'=>300))): ?>
<div class="description"><p><?php echo $desc; ?></p></div>
<?php endif; ?>
</div>
<?php endwhile; ?>
</div>
<?php else: ?>
<p>No recent items available.</p>
<?php endif; ?>
<!-- Link to Collection -->
<p class="view-items-link">">View All Items</p>
</div><!--end collection-items -->
This is kind of bulky. I am working on a helper fu
Question 2
Collections aren't associated with images, only a description. It seems they are more of an organization scheme than a display function. I am working on a spared down version of the code above that just brings in an item thumbnail by id,
then styles the .collection-description and .collection-img classes. Again this is clunky. I would like to create a function similar to display_random_featured_collection(), that would at least pull the item img into a reusable helper.