Answers.Body: <p>You can repeat a loop with another <code>for</code> loop.</p>
  
  <p>For example, here's a loop that repeats 15 times:</p>
  
  <pre><code>{% for i in 1..15 %}
      Loop: {{ i }}&lt;br&gt;
      {% for entry in block.homeClientQuote %}
        ...
      {% endfor %}
  {% endfor %}
  </code></pre>
  
  <p>You can also use the <code>i</code> variable if you need to change the output depending on the loop number.</p>
  
  <pre><code>{% if i &gt; 10 %}{% endif %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-02T00:37:03.720Z
Answers.Text: Tip of the ol' ballcap to ya, Mr. Roper - that did it! Thank you!
Answers.UserDisplayName: dpayne
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-01T19:55:21.450Z
Answers.LastActivityDate: 2017-03-01T20:01:10.307Z
Answers.LastEditDate: 2017-03-01T20:01:10.307Z
Answers.UserDisplayName: Alex Roper
Body: <p>So I've got a Matrix block that is pulling in some entries and I'm looping through the entries in that block in a template. I'm then pulling a text field from each entry and putting it onto a page. Currently, there are three total entries in that block (though that will likely expand over time). Once I hit the third and final entry, I would like the loop to start over again at the first, loop through the entries again until it gets to the last entry and start over again. I'd like to do that continuously up to a point - say 15 loops. </p>
  
  <p>I'm struggling with how to get the entry loop to start over once it reaches the last entry. </p>
  
  <p>This is the current basic code that loops through the entries and then loops through the matrix blocks within the entries to output the text to pull into the page.</p>
  
  <pre><code>{% for entry in block.homeClientQuote %}                                
      &lt;div&gt;
          {% for block in entry.clientQuote %}
              {{ block.actualClientQuote }}
          {% endfor %} 
      &lt;/div&gt;
  {% endfor %}
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-03-01T07:59:20.147Z
Comments.Text: Could you be a little more clear in your question? A thing that might clear things up for yourself is by not mixing block's and entry's as prefixes in your code inside of loops that already use these. It might be confusing and making errors hard to see if you keep using the same name's
Comments.UserDisplayName: Justin Dekkers
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-03-01T16:18:22.007Z
Comments.Text: @JustinDekkers Updated the question to make it more clear and good point on the mixing blocks and entries as prefixes.
Comments.UserDisplayName: dpayne
Tags: <templating><matrix><forloop><loop>
Title: How Do I Restart an Entries Loop Once It Hits the Last Entry
ThreadText: # How Do I Restart an Entries Loop Once It Hits the Last Entry
  
  (Asked by: username_0 on 2017-03-01)
  
  So I've got a Matrix block that is pulling in some entries and I'm looping through the entries in that block in a template. I'm then pulling a text field from each entry and putting it onto a page. Currently, there are three total entries in that block (though that will likely expand over time). Once I hit the third and final entry, I would like the loop to start over again at the first, loop through the entries again until it gets to the last entry and start over again. I'd like to do that continuously up to a point - say 15 loops.
  
  I'm struggling with how to get the entry loop to start over once it reaches the last entry.
  
  This is the current basic code that loops through the entries and then loops through the matrix blocks within the entries to output the text to pull into the page.
  
  ```
  {% for entry in block.homeClientQuote %}                                
      <div>
          {% for block in entry.clientQuote %}
              {{ block.actualClientQuote }}
          {% endfor %} 
      </div>
  {% endfor %}
  
  ```
  
  **Tags:** templating, matrix, forloop, loop
  
  > **Comments:**
  > **username_1**: Could you be a little more clear in your question? A thing that might clear things up for yourself is by not mixing block's and entry's as prefixes in your code inside of loops that already use these. It might be confusing and making errors hard to see if you keep using the same name's  
  > **username_0**: @username_1 Updated the question to make it more clear and good point on the mixing blocks and entries as prefixes.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2017-03-01. Score: 2 | Accepted answer
  
  You can repeat a loop with another `for` loop.
  
  For example, here's a loop that repeats 15 times:
  
  ```
  {% for i in 1..15 %}
      Loop: {{ i }}<br>
      {% for entry in block.homeClientQuote %}
        ...
      {% endfor %}
  {% endfor %}
  
  ```
  
  You can also use the `i` variable if you need to change the output depending on the loop number.
  
  ```
  {% if i > 10 %}{% endif %}
  
  ```
  
  > **Comments:**
  > **username_0**: Tip of the ol' ballcap to ya, Mr. username_2 - that did it! Thank you!  
  
  ---
  
  