<p>This should do it, user2569  </p>

<pre><code>{% for block in entry.myMatrix %}
    {% if block.type == 'intro' %}
        {{ block.intro }}
    {% endif %}
{% endfor %}
</code></pre>

CC BY-SA 3.0
2016-11-21T10:32:01.700Z
Yep thats it great!
user2569
CC BY-SA 3.0
2016-11-21T05:31:21.027Z
2016-11-21T09:39:31.397Z
2016-11-21T09:39:31.397Z
Nutmeg
<p>I want to show a child entry and can so:</p>

<pre><code>&lt;ul&gt;
    {% for entry in craft.entries.section('products') %}

    {% switch entry.level %}
        {% case '1' %}
            {# level 1 #}
            &lt;h1&gt;{{ entry.title }}&lt;/h1&gt;

        {% case '2' %}
        &lt;li&gt;    
            {# level 2 #}
            &lt;h2&gt;{{ entry.title }}&lt;/h2&gt;

        {% case '3' %}
        &lt;ul&gt; &lt;li&gt;
            {# level 3 #}
            &lt;h4&gt;{{ entry.title }}&lt;/h4&gt;
            &lt;/li&gt;
            &lt;/ul&gt;
        {% case '4' %}
            {# level 4 #}
            4
            &lt;/li&gt;
    {% endswitch %}

    {% endfor %}
&lt;/ul&gt;
</code></pre>

<p>but I can't get a matrix field to show for the child entry, using:</p>

<pre><code>{% for block in entry.myMatrix %}

            {{ block.intro }}

{% endfor %} 
</code></pre>

<p>within any of the cases?</p>

CC BY-SA 3.0
2016-11-20T20:15:47.870Z
`{% for block in entry.myMatrix %}{% if block.type == 'intro' %} {{  block.intro }} {% endif %}{% endfor %}`
Nutmeg
CC BY-SA 3.0
2016-11-21T04:47:19.527Z
Seems like that should be an answer instead of a comment, @Nutmeg. :)  Would get my vote.
Brad Bell
<matrix>
Show a child's Matrix within a Structure
# Show a child's Matrix within a Structure

(Asked by: username_0 on 2016-11-20)

I want to show a child entry and can so:

    {% for entry in craft.entries.section('products') %}

    {% switch entry.level %}
        {% case '1' %}
            {# level 1 #}
            {{ entry.title }}

        {% case '2' %}
            
            {# level 2 #}
            {{ entry.title }}

        {% case '3' %}
         
            {# level 3 #}
            {{ entry.title }}
            
            
        {% case '4' %}
            {# level 4 #}
            4
            
    {% endswitch %}

    {% endfor %}


but I can't get a matrix field to show for the child entry, using:
{% for block in entry.myMatrix %}

            {{ block.intro }}

{% endfor %} 

within any of the cases?

**Tags:** matrix

> **Comments:**
> **username_1**: `{% for block in entry.myMatrix %}{% if block.type == 'intro' %} {{  block.intro }} {% endif %}{% endfor %}`  
> **username_2**: Seems like that should be an answer instead of a comment, @username_1. :)  Would get my vote.  

---

## 1 answers

### Answer by username_1 on 2016-11-21. Score: 1 | Accepted answer

This should do it, username_0  
{% for block in entry.myMatrix %}
    {% if block.type == 'intro' %}
        {{ block.intro }}
    {% endif %}
{% endfor %}

> **Comments:**
> **username_0**: Yep thats it great!  

---

