Answers.Body: <p>I think your output is wrong. Looking at your code and explanation, <code>{% for row in entry.hgroup %}</code> should be: <code>{% for row in block.hgroup %}</code></p>
  
  <p>Same goes for <code>{{ entry.heading }}</code> This should be: <code>{{ row.heading }}</code></p>
  
  <p>Copy should be: <code>{{ block.copy }}</code></p>
  
  <p>Working with matrixes and Supertable's is hard in the beginning but you'll get the hang of it. </p>
  
  <p>When you loop over you <code>{{ entry.about }}</code> you loop using a variable named <code>block</code>. that should be used for every field you want to output that's in the matrix field. Same goes for SuperTable's only just one layer deeper.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-07T00:32:24.603Z
Answers.Text: Thank you! Had to change the switch statement also to '{% switch block.type %}' . I couldnt understand how to use SuperTable but seems so simple now, thanks!
Answers.UserDisplayName: Spheriri
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-04T16:31:32.487Z
Answers.LastActivityDate: 2017-01-04T16:31:32.487Z
Answers.UserDisplayName: Justin Dekkers
Answers.Body: <p>As an added bonus, this is documented on the Super Table plugin Github page - <a href="https://github.com/engram-design/SuperTable#documentation" rel="nofollow noreferrer">https://github.com/engram-design/SuperTable#documentation</a></p>
  
  <p>Specifically the <code>Matrix in Super Table field</code> - <a href="https://github.com/engram-design/SuperTable/wiki/Templating-examples#matrix-in-super-table-field" rel="nofollow noreferrer">https://github.com/engram-design/SuperTable/wiki/Templating-examples#matrix-in-super-table-field</a> - although I'm aware that the question was for a Super Table in Matrix field - its more than enough to get started. Glad you got it solved!</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-09T14:56:09.083Z
Answers.LastActivityDate: 2017-01-09T14:56:09.083Z
Answers.UserDisplayName: crawf
Body: <p>after searching around for awhile I still cannot find a clear answer to templating Supertables within a matrix field.</p>
  
  <p>I have a field called 'about' which is the matrix field, within that there is a block called 'biography' which holds both a Rich Text Field called 'copy', and a SuperTable field called hgroup, within hgroup there is a plain text field called heading. How do I go about outputting these within the template.</p>
  
  <p>There are other blocks, similar to 'biography', but I'm encountering the same issue with them.</p>
  
  <p>I'm still very new to CraftCMS so some of this has me puzzled.</p>
  
  <pre><code>{% block content %}
    {% for block in entry.about %}
      {% switch entry.about %}
          {% case 'biography' %}
            &lt;section&gt;
              &lt;div class="contain"&gt;
                &lt;article&gt;
                  {% for row in entry.hgroup %}
                    &lt;header&gt;
                      &lt;h3&gt;{{ entry.heading }}&lt;/h3&gt;
                    &lt;/header&gt;
                  {% endfor %}
                    {{ entry.copy }}
                &lt;/article&gt;
              &lt;/div&gt;
            &lt;/section&gt;
      {% endswitch %}
    {% endfor %}
  {% endblock %}
  </code></pre>
  
  <p>Thanks.</p>
  
Tags: <templating><plugins><craft-features><plugin-supertable>
Title: Outputting supertables within a matrix
ThreadText: # Outputting supertables within a matrix
  
  (Asked by: username_0 on 2017-01-04)
  
  after searching around for awhile I still cannot find a clear answer to templating Supertables within a matrix field.
  
  I have a field called 'about' which is the matrix field, within that there is a block called 'biography' which holds both a Rich Text Field called 'copy', and a SuperTable field called hgroup, within hgroup there is a plain text field called heading. How do I go about outputting these within the template.
  
  There are other blocks, similar to 'biography', but I'm encountering the same issue with them.
  
  I'm still very new to CraftCMS so some of this has me puzzled.
  
  ```
  {% block content %}
    {% for block in entry.about %}
      {% switch entry.about %}
          {% case 'biography' %}
            <section>
              <div class="contain">
                <article>
                  {% for row in entry.hgroup %}
                    <header>
                      <h3>{{ entry.heading }}</h3>
                    </header>
                  {% endfor %}
                    {{ entry.copy }}
                </article>
              </div>
            </section>
      {% endswitch %}
    {% endfor %}
  {% endblock %}
  
  ```
  
  Thanks.
  
  **Tags:** templating, plugins, craft-features, plugin-supertable
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2017-01-04. Score: 1 | Accepted answer
  
  I think your output is wrong. Looking at your code and explanation, `{% for row in entry.hgroup %}` should be: `{% for row in block.hgroup %}`
  
  Same goes for `{{ entry.heading }}` This should be: `{{ row.heading }}`
  
  Copy should be: `{{ block.copy }}`
  
  Working with matrixes and Supertable's is hard in the beginning but you'll get the hang of it.
  
  When you loop over you `{{ entry.about }}` you loop using a variable named `block`. that should be used for every field you want to output that's in the matrix field. Same goes for SuperTable's only just one layer deeper.
  
  > **Comments:**
  > **username_0**: Thank you! Had to change the switch statement also to '{% switch block.type %}' . I couldnt understand how to use SuperTable but seems so simple now, thanks!  
  
  ---
  
  ### Answer by username_2 on 2017-01-09. Score: 1
  
  As an added bonus, this is documented on the Super Table plugin Github page - <https://github.com/engram-design/SuperTable#documentation>
  
  Specifically the `Matrix in Super Table field` - <https://github.com/engram-design/SuperTable/wiki/Templating-examples#matrix-in-super-table-field> - although I'm aware that the question was for a Super Table in Matrix field - its more than enough to get started. Glad you got it solved!
  
  
  ---
  
  