Answers.Body: <p>I'm assuming you are talking about your block type having a Entries field within.</p>
  
  <p>You simply loop through it like this:</p>
  
  <pre><code>{% case 'BlockType3' %}
  &lt;div class="row"&gt;
  {% for entry in block.entriesFieldHandle %}
      &lt;div class="col"&gt;{{ entry.title }}&lt;/div&gt;
  {% endfor %}
  &lt;/div&gt;
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-22T10:48:58.163Z
Answers.LastActivityDate: 2015-05-22T10:48:58.163Z
Answers.UserDisplayName: Fred Carlsen
Body: <p>I have a Matrix field with 4 Block types. I loop through them like this</p>
  
  <pre><code>{% for block in entry.MatrixFieldHandle %}
      {% set type = block.type.handle %}
  
      {% switch type %}
          {% case 'BlockType1' %}
              {{ block.fieldHandle }}
  
          {% case 'BlockType2' %}
              {{ block.fieldHandle }}
  </code></pre>
  
  <p>within one of these cases, I need to loop through the entries:</p>
  
  <pre><code>{% case 'BlockType3' %}
      {% for row in block|batch(2) %}
          &lt;div class="row"&gt;
  
          {% for block in row %}
              &lt;div class="col"&gt;{{ block.fieldHandle }}&lt;/div&gt;
          {% endfor %}
      &lt;/div&gt;
  {% endfor %}
  </code></pre>
  
  <p>The html output is close, but I do not get any content displayed. What is wrong?</p>
  
Tags: <matrix>
Title: Loop through entries in a Matrix block type
ThreadText: # Loop through entries in a Matrix block type
  
  (Asked by: username_0 on 2015-05-22)
  
  I have a Matrix field with 4 Block types. I loop through them like this
  
  ```
  {% for block in entry.MatrixFieldHandle %}
      {% set type = block.type.handle %}
  
      {% switch type %}
          {% case 'BlockType1' %}
              {{ block.fieldHandle }}
  
          {% case 'BlockType2' %}
              {{ block.fieldHandle }}
  
  ```
  
  within one of these cases, I need to loop through the entries:
  
  ```
  {% case 'BlockType3' %}
      {% for row in block|batch(2) %}
          <div class="row">
  
          {% for block in row %}
              <div class="col">{{ block.fieldHandle }}</div>
          {% endfor %}
      </div>
  {% endfor %}
  
  ```
  
  The html output is close, but I do not get any content displayed. What is wrong?
  
  **Tags:** matrix
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-05-22. Score: 4 | Accepted answer
  
  I'm assuming you are talking about your block type having a Entries field within.
  
  You simply loop through it like this:
  
  ```
  {% case 'BlockType3' %}
  <div class="row">
  {% for entry in block.entriesFieldHandle %}
      <div class="col">{{ entry.title }}</div>
  {% endfor %}
  </div>
  
  ```
  
  
  ---
  
  