Answers.Body: <p>Something like this should do what you're looking for:</p>
  
  <pre><code>{% for block in entry.body %}
  
      {% set fields = block.getFieldLayout().getFields() %}
  
      &lt;ul&gt;
          &lt;li&gt;{{ block.getType().name }}
          &lt;ul&gt;
              {% for field in fields %}
                  &lt;li&gt;{{ field.getField().name }}
              {% endfor %}
          &lt;/ul&gt;
      &lt;/ul&gt;
  
  {% endfor %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-05-08T09:03:31.610Z
Answers.Text: I want to output label of field, not value of field.
Answers.UserDisplayName: Filip Bartnicki
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-05-08T22:56:42.533Z
Answers.Text: Sorry, misunderstood the question.  Updated answer.
Answers.UserDisplayName: Brad Bell
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-05-05T21:13:13.993Z
Answers.LastActivityDate: 2017-05-08T22:56:22.397Z
Answers.LastEditDate: 2017-05-08T22:56:22.397Z
Answers.UserDisplayName: Brad Bell
Body: <p>I have Matrix field containing block with various fields. How can I output into template label of single field?</p>
  
  <p>Can I get type of that field? (for example - textfield, dropdown field, etc.)</p>
  
Tags: <templating>
Title: Get field Matrix field label inside template
ThreadText: # Get field Matrix field label inside template
  
  (Asked by: username_0 on 2017-05-05)
  
  I have Matrix field containing block with various fields. How can I output into template label of single field?
  
  Can I get type of that field? (for example - textfield, dropdown field, etc.)
  
  **Tags:** templating
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-05-05. Score: 2
  
  Something like this should do what you're looking for:
  
  ```
  {% for block in entry.body %}
  
      {% set fields = block.getFieldLayout().getFields() %}
  
      <ul>
          <li>{{ block.getType().name }}
          <ul>
              {% for field in fields %}
                  <li>{{ field.getField().name }}
              {% endfor %}
          </ul>
      </ul>
  
  {% endfor %}
  
  ```
  
  > **Comments:**
  > **username_0**: I want to output label of field, not value of field.  
  > **username_1**: Sorry, misunderstood the question.  Updated answer.  
  
  ---
  
  