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() %}
<div class="col-8 {% if loop.last %}last{% endif %}">
{% for block in entry.blogBody %}
{% switch block.type %}
{% case "text" %}
{{ block.text|hacksaw(chars='100', append='...') }}
{% case "blogimage" %}
{% for asset in block.image %}
<img src="{{ asset.getUrl() }}" alt=""/>
{% endfor %}
{% endswitch %}
{% endfor %}
</div>
{% endfor %}
</div>
{% endblock %}