title: Drupal 7 gallery teaser
body: <p>I've created a simple gallery in Drupal using a custom content type.  It's really just an article with an image field that can have an unlimited number of items.  I've created a custom template for this content type (node--gallery.tpl.php) and for the full page I'm satisfied with the look and feel.  </p>
  
  <p>The one thing I'm stuck on is displaying only the first few images in the teaser.  I want to display just the first row of images in the teaser (that first 3 images).  In the template file, <code>$content['field_images']</code> contains all the images for the gallery but <code>print render($content['field_images']</code> outputs all the images (as I would expect).</p>
  
  <p>So, how do I get Drupal to just output the first three items from <code>$content['field_images']</code>?  An improvement I would be interested in is how would I get Drupal to output 3 random images although if I know how to cut down the number of images rendered I'm confident I can work that one out myself.</p>