Answers.Body: <p>Firstly, you'll need to change:</p>
  
  <p><code>{% for row in superTableBlock %}</code> to <code>{% for row in block.superTableBlock %}</code></p>
  
  <p>So you can reference the Super Table field within your out Matrix field.</p>
  
  <p>You also don't need to loop through <code>{% for block in row.superTableBlock %}</code></p>
  
  <p>I can't tell if you're looping through the inner Matrix field. Have you tried:</p>
  
  <pre><code>{% for block in entry.matrixFieldParent %}
      {% if block.type == "sectionBuilder" %}
          {% for row in block.sectionBlock %}
              {% for sectionLayout in row.sectionLayout %}
                  {% switch sectionLayout.type %}
                      {% case "contentBlock" %}
                         {{ sectionLayout.sectionGrid }}
                      {% case "articlesFeedBlock" %}
                         {{ sectionLayout.sectionBackground }}
                  {% endswitch %}
              {% endfor %}
          {% endfor %}
      {% endif %}
  {% endfor %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-30T23:14:46.427Z
Answers.LastActivityDate: 2016-08-31T00:01:43.470Z
Answers.LastEditDate: 2016-08-31T00:01:43.470Z
Answers.UserDisplayName: crawf
Body: <p>I have a matrix field with a Super Table block type. Then I have a matrix field as a field within the Super Table block. I am having trouble filtering by block type from within the child matrix field. Is what I am trying to achieve even possible? Any solution would save me from pulling my hair out any further.</p>
  
  <p>Below is the last attempt I made to filter through before posting here:</p>
  
  <pre><code>{% for block in entry.matrixFieldParent %}
  
      {% if block.type == "superTableBlock" %}
  
          {% for row in superTableBlock %}
  
              {% for block in row.superTableBlock %}
  
                  {% switch block.type %}
  
                      {% case "contentBlock1" %}
  
                         {{ block.contentField }}
  
                      {% case "contentBlock2" %}
  
                         {{ block.contentField }}
  
                  {% endswitch %}
  
              {% endfor %}
  
          {% endfor %}
  
      {% endif %}
  
  {% endfor %}
  </code></pre>
  
  <p>edited to include if statement previously left out by mistake</p>
  
Tags: <matrix><plugin-supertable>
Title: Matrix -> Super Table - > Matrix
ThreadText: # Matrix -> Super Table - > Matrix
  
  (Asked by: username_0 on 2016-08-30)
  
  I have a matrix field with a Super Table block type. Then I have a matrix field as a field within the Super Table block. I am having trouble filtering by block type from within the child matrix field. Is what I am trying to achieve even possible? Any solution would save me from pulling my hair out any further.
  
  Below is the last attempt I made to filter through before posting here:
  
  ```
  {% for block in entry.matrixFieldParent %}
  
      {% if block.type == "superTableBlock" %}
  
          {% for row in superTableBlock %}
  
              {% for block in row.superTableBlock %}
  
                  {% switch block.type %}
  
                      {% case "contentBlock1" %}
  
                         {{ block.contentField }}
  
                      {% case "contentBlock2" %}
  
                         {{ block.contentField }}
  
                  {% endswitch %}
  
              {% endfor %}
  
          {% endfor %}
  
      {% endif %}
  
  {% endfor %}
  
  ```
  
  edited to include if statement previously left out by mistake
  
  **Tags:** matrix, plugin-supertable
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-08-30. Score: 2 | Accepted answer
  
  Firstly, you'll need to change:
  
  `{% for row in superTableBlock %}` to `{% for row in block.superTableBlock %}`
  
  So you can reference the Super Table field within your out Matrix field.
  
  You also don't need to loop through `{% for block in row.superTableBlock %}`
  
  I can't tell if you're looping through the inner Matrix field. Have you tried:
  
  ```
  {% for block in entry.matrixFieldParent %}
      {% if block.type == "sectionBuilder" %}
          {% for row in block.sectionBlock %}
              {% for sectionLayout in row.sectionLayout %}
                  {% switch sectionLayout.type %}
                      {% case "contentBlock" %}
                         {{ sectionLayout.sectionGrid }}
                      {% case "articlesFeedBlock" %}
                         {{ sectionLayout.sectionBackground }}
                  {% endswitch %}
              {% endfor %}
          {% endfor %}
      {% endif %}
  {% endfor %}
  
  ```
  
  
  ---
  
  