Body: <p>Is there a way to pull out all entry fields for an entry by their handle so they can be looped through?</p>
  
  <p>For example rather than doing each field manually like <code>{{ entry.title }}</code>, <code>{{ entry.description }}</code> and <code>{{ entry.date }}</code>, just do a loop.</p>
  
  <pre><code>{% for field in entry %}
      {{ field.fieldHandle }}
  {% endfor %}
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-08-18T13:04:35.787Z
Comments.Text: Hey Lettie, have at the question linked above and let us know if it solves your problem.
Comments.UserDisplayName: carlcs
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-08-19T09:37:35.540Z
Comments.Text: Cheers @carlcs that's certainly helped. Quick question I want to also check if the field is a matrix field and then pull out all the block handles and content. I've tried:
      {% if field.fieldType == 'Matrix' %}
          <strong>Matrix Field: </strong>
      {% endif %}
  But with no luck also tried just field.type and lower case matrix. What am I missing? Cheers.
Comments.UserDisplayName: Lettie
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-08-19T09:47:35.170Z
Comments.Text: Ignore that was almost there worked it out field.type == 'Matrix' thanks for you help.
Comments.UserDisplayName: Lettie
Tags: <entries><field><entries-field>
Title: Return all entry types or entry fields for one entry object
ThreadText: # Return all entry types or entry fields for one entry object
  
  (Asked by: username_0 on 2015-08-17)
  
  Is there a way to pull out all entry fields for an entry by their handle so they can be looped through?
  
  For example rather than doing each field manually like `{{ entry.title }}`, `{{ entry.description }}` and `{{ entry.date }}`, just do a loop.
  
  ```
  {% for field in entry %}
      {{ field.fieldHandle }}
  {% endfor %}
  
  ```
  
  **Tags:** entries, field, entries-field
  
  > **Comments:**
  > **username_1**: Hey username_0, have at the question linked above and let us know if it solves your problem.  
  > **username_0**: Cheers @username_1 that's certainly helped. Quick question I want to also check if the field is a matrix field and then pull out all the block handles and content. I've tried:     {% if field.fieldType == 'Matrix' %}         <strong>Matrix Field: </strong>     {% endif %} But with no luck also tried just field.type and lower case matrix. What am I missing? Cheers.  
  > **username_0**: Ignore that was almost there worked it out field.type == 'Matrix' thanks for you help.  
  
  ---
  
  ## 0 answers
  
  