Matrix - using Limit on block types I'm using Matrix fields for blog posts. These are made up of text and image block types. I want to pull in only the first image block and a snippet of text from the first text block into the blogs index page for listing the entries. 

Adding limit(1) to each block type didn't work.

{% for entry in craft.entries.section('blog').limit(3).find() %}
&lt;div class="col-8  {% if loop.last %}last{% endif %}"&gt;

    {% for block in entry.blogBody %}

    {% switch block.type %}

      {% case "text" %}
      {{ block.text|hacksaw(chars='100', append='...') }}

      {% case "blogimage" %}
       {% for asset in block.image %}
          &lt;img src="{{ asset.getUrl() }}" alt=""/&gt;
      {% endfor %}

 {% endswitch %}

{% endfor %}
&lt;/div&gt;
{% endfor %}

&lt;/div&gt;

{% endblock %}
You can limit which blocks you want by type and only show the first of each, if they exist. Something like this might do the trick:

{% for entry in craft.entries.section('blog').limit(3).find() %}
    &lt;div class="col-8  {% if loop.last %}last{% endif %}"&gt;

        {% set textBlock = entry.blogBody.type('text').first() %}
        {% set imgBlock = entry.blogBody.type('blogimage').first() %}

        {% if textBlock %}
            {{ textBlock.text|hacksaw(chars='100', append='...') }}
        {% endif %}

        {% if imgBlock %}
              &lt;img src="{{ imgBlock.image[0].getUrl() }}" alt=""/&gt;
        {% endif %}
    &lt;/div&gt;
{% endfor %}

&lt;/div&gt;

{% endblock %}